1、var domObj = $("<dom>");
2、var a = $("<a href='www.baidu.com'>");
3、alert(a.prop("outerHTML"));
//另外一种方法clone复制一份参数true表示同时复制事件
that.clone(true).prependTo(that.parent());
that.remove();
1、var domObj = $("<dom>");
2、var a = $("<a href='www.baidu.com'>");
3、alert(a.prop("outerHTML"));
//另外一种方法clone复制一份参数true表示同时复制事件
that.clone(true).prependTo(that.parent());
that.remove();
转载于:https://www.cnblogs.com/sallet/p/4013276.html