<div id="node"><p>Hello World !</p></div>
<div id="copy"></div>
var clone = $("#node").get(0).cloneNode(true);
console.log(clone);
var $clone = $(clone); // JQUERY object
$('#copy').empty().html($clone.html());
<div id="node"><p>Hello World !</p></div>
<div id="copy"></div>
var clone = $("#node").get(0).cloneNode(true);
console.log(clone);
var $clone = $(clone); // JQUERY object
$('#copy').empty().html($clone.html());
本文标题:ie8+支持jQuery clone
本文链接:https://www.haomeiwen.com/subject/pisdsttx.html
网友评论