标签:
<div id="tests" class="a b c" style="color:#f00">123</div>
var test = tests.firstChild.nodeValue; tests = tests.childNodes[0]; tests.insertData(0,789);//从前插入789 var t2 = document.querySelector("#tests");//获取id号 console.log(t2.mozMatchesSelector(".c"));////t2是否含有c的classname
标签:
原文地址:http://www.cnblogs.com/xupeiyu/p/4804266.html