<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<meta name="description" content="">
<meta name="keywords" content="">
<title>Examples</title>
<style type="text/css">
*{margin: 0;padding: 0;}
a{text-decoration: none;color: #333;}
ul,li{list-style: none;}
body{font-size: 14px;font-family: "微软雅黑";}
</style>
</head>
<body>
<div id="box">
112444
<span>22</span>
</div>
<script type="text/javascript">
var box = document.getElementById("box");
fn(box.nextSibling.nodeName);//nextSibling返回此对象往后的紧跟节点,以对象方式返回;nodeName返回节点名称
var copy=document.getElementById("box").lastChild.cloneNode("aaa");
document.getElementsByTagName("span").appendChild(copy);
function fn(value){
return document.write(value+'\n');
}
</script>
</body>
</html>
实在找不到这26行哪里错了
西兰花伟大炮
相关分类