控制台报错代码window.onload = function(){ var para = document.createElement("p"); var testdiv = document.getElementById("testdiv"); testdiv.appendChild(para); var txt = document.createTextNode("Hello world"); para.appendChild(txt);}Uncaught TypeError: Cannot read property 'appendChild' of null at window.onload (test.js:4)window.onload @ test.js:4
添加回答
举报
0/150
提交
取消