我克隆了一个这样的元素
var myVar = null;
myVar = $(someOtherVar).clone(true, true)
现在我想anotherVar完全替换为myVar. 怎么做?
我试过$(anotherVar).replaceWith(myVar)了,但这不起作用。还有其他方法可以anotherVar完全替换为 的数据和事件myVar吗?
我克隆了一个这样的元素
var myVar = null;
myVar = $(someOtherVar).clone(true, true)
现在我想anotherVar完全替换为myVar. 怎么做?
我试过$(anotherVar).replaceWith(myVar)了,但这不起作用。还有其他方法可以anotherVar完全替换为 的数据和事件myVar吗?