慕粉15680718726
2016-07-29 23:35
<!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 id="x1">HTML</li>
</ul>
<script type="text/javascript">
var otest = document.getElementById("test");
var node = document.getElementById("x1");
var newnode = document.createElement("li");
newnode.innerHTML="php";
otese.insertBefore(newnode,node);
</script>
</body>
</html>
otese.insertBefore(newnode,node); 是不是此处单词写错otest
JavaScript进阶篇
468196 学习 · 21891 问题
相似问题