时间:2024-11-02 05:11:18
1、创建临时父元素。var frag=document.createDocumentFragment();
3、把子元素加入到临时父元素中。frag.appendChild(p1);frag.appendChild(p2);