这个编译器结果是有问题吧
<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>无标题文档</title>
</head>
<body>
<ul id="test">
<li>JavaScript</li>
<li>HTML</li>
</ul>
<script type="text/javascript">
var otest = document.getElementById("test");
var newnode = document.createElement("li");
newnode.innerHTML = "PHP";
otest.appendChild(newcode);
// var otest = document.getElementById("test");
// var newcode = document.createElement("li");
// newcode.innerHTML = "PHP";
// otest.appendChild(newcode);
</script>
</body>
</html>
定义newnode,otest.appendChild(newnode)却输出不了PHP
otest.appendChild(newcode)就输出了PHP..
然后同样的代码我用EDGE打开就正常了