Range.cloneContents()
>Range.cloneContents() 返回一个 DocumentFragment,它是 Range 中所有的 Node 对象的副本。
使用" DOM 事件"添加的“事件侦听器”在克隆过程中不会被复制。HTML 属性事件与“DOM Core cloneNode”方法一样被复制。“HTML id 属性”也将被克隆,这可能导致通过克隆导致无效的文档。
Partially selected nodes include the parent tags necessary to make the document fragment valid.