这个代码就几行,为什么没反应??崩溃了
<html>
<body>
<script >
e1=document.createElement("p");
t1=document.createTextNode("jdjs");
e1.appendChild(t1);
</script>
</body>
</html>
e1还没被append到页面上呢
1,create单词拼错
2,需要将e1加入到dom树上
e1=document.createElement("p");
t1=document.createTextNode("jdjs");
e1.appendChild(t1);
document.body.appendChild(e1);
肯定没反应啊,你没有把e1加入到dom树中