问题出现在哪里?
<ul id="test">
<li>JavaScript</li>
<li>HTML</li>
</ul>
<script type="text/javascript">
var otest = document.getElementById("test");
var addli=document.createElement("li");
addli.innerHTML="PHP";
otext.appendChild(addli);
</script>
<ul id="test">
<li>JavaScript</li>
<li>HTML</li>
</ul>
<script type="text/javascript">
var otest = document.getElementById("test");
var addli=document.createElement("li");
addli.innerHTML="PHP";
otext.appendChild(addli);
</script>
2016-07-09
举报