去除页面中JS调用,谁能拯救?
我现在是通过JQuery的笨方法实现的
如:
$("#div_Preview_Content *").each(function () {
$(this).removeAttr("onblur");
$(this).removeAttr("onclick");
$(this).removeAttr("ondblclick");
$(this).removeAttr("onfocus");
$(this).removeAttr("onkeydown");
$(this).removeAttr("onkeypress");
$(this).removeAttr("onkeyup");
$(this).removeAttr("onmousedown");
$(this).removeAttr("onmouseout");
$(this).removeAttr("onmousemove");
$(this).removeAttr("onmouseover");
$(this).removeAttr("onmouseup");
});
但是这样的实现方式,性能明显达不到要求
谁能提供更好的实现或思路吗?