createDocumentFragment 详解
来源:互联网 发布:战无不胜战骑进阶数据 编辑:程序博客网 时间:2024/06/17 18:34
DocumentFragment 是一個無父對象的document對象. 他支持以下DOM2方法: appendChild
, cloneNode
, hasAttributes
, hasChildNodes
, insertBefore
, normalize
, removeChild
, replaceChild
.
也支持以下DOM2屬性 attributes
, childNodes
, firstChild
, lastChild
, localName
, namespaceURI
, nextSibling
, nodeName
, nodeType
, nodeValue
, ownerDocument
, parentNode
, prefix
, previousSibling
, textContent
.
其他方法可以將document fragment 作為一個參數,(比如Node 的 appendChild和insertBefore 方法),
這樣,fragment 就可以被追加到父對象中。
Example:
1var frag = document.createDocumentFragment();
2frag.appendChild(document.createTextNode('Ipsum Lorem'));
3document.body.appendChild(frag);
4
2frag.appendChild(document.createTextNode('Ipsum Lorem'));
3document.body.appendChild(frag);
4
以上所有的方法是在DOM2基礎上測試通過。
- createDocumentFragment 详解
- createDocumentFragment
- 关于createDocumentFragment
- CreateDocumentFragment()的妙用
- CreateDocumentFragment的用处
- document的createDocumentFragment()方法
- CreateDocumentFragment的用处
- document的createDocumentFragment()方法
- document的createDocumentFragment()方法
- document的createDocumentFragment()方法
- document.createDocumentFragment()的用法
- document.createDocumentFragment()的用法
- document.createDocumentFragment()的用法
- document的createDocumentFragment()方法
- document的createDocumentFragment()方法
- HTML DOM createDocumentFragment() 方法
- document的createDocumentFragment()方法
- document的createDocumentFragment()方法
- Office插件开发(8)
- references count 以及copy on write
- 日历界面
- 2011-06-09
- 分治一则 2011-06-09
- createDocumentFragment 详解
- 电梯问题
- china-pub网上书店计算机图书近周销售排行top5
- c# asp.net ajax 用法一例
- (转)从网上找到用java给zip文件加密的方法
- sizeof补充
- 汉字排序
- VirtualBox中Ubuntu与主机(windows)共享数据空间配置
- Problem42