求大神帮我比较一下两种写法的区别
var otest = document.getElementById("test");
var newnode = document.createElement("li");
var newtext= document.createTextNode("PHP");
newnode.appendChild(newtext);
otest.appendChild(newnode);var otest = document.getElementById("test");
var newnode = document.createElement("li");
newnode.innerHTML="PHP";
otest.appendChild(newnode);虽然都能实现同样的效果,但是两种写法哪个更好一点啊