html页面标签字符串转js的dom对象
解决方法:
var htmlstr='<!DOCTYPE ><html><head></head><div id="tasks_article">hhh</div><html>';
var createDom= document.createElement(htmlstr);
createDom.innerHTML = arg;
var jquerydom=$(createDom).find("#tasks_article");
html页面标签字符串转js的dom对象
解决方法:
var htmlstr='<!DOCTYPE ><html><head></head><div id="tasks_article">hhh</div><html>';
var createDom= document.createElement(htmlstr);
createDom.innerHTML = arg;
var jquerydom=$(createDom).find("#tasks_article");
有建议,请留言!