节点是XML文件中有效而完整的结构的最小单元。内含标示组的节点,加上必要属性、属性值及内容,便可构成一个元素。节点的标志符<>。
动态创建节点
js的方法
varbox=document.getElementById("box");
vara=document.createElement("a");
box.appendChild(a);
a.setAttribute("href","http://web.itcast.cn");
a.setAttribute("target","_blank");
a.innerhtml="传智大前端";
jQuery的方法
$(function(){
$("#box").append('<ahref="http://web.itcast.cn" rel="nofollow" rel="nofollow" rel="nofollow" rel="nofollow" rel="nofollow" rel="nofollow" rel="nofollow" rel="nofollow" rel="nofollow" rel="nofollow" rel="nofollow" rel="nofollow" rel="nofollow" rel="nofollow" rel="nofollow" rel="nofollow" rel="nofollow" rel="nofollow">传智大前端</a>');
});
<!DOCTYPEhtml>
<htmllang="zh-CN">
<head>
<metacharset="UTF-8">
<title>Title</title>
<style>
div{
width:400px;
height:400px;
background-color:pink;
}
</style>
</head>
<body>
<!--<ahref="http://web.itcast.cn" rel="nofollow" rel="nofollow" rel="nofollow" rel="nofollow" rel="nofollow" rel="nofollow" rel="nofollow" rel="nofollow" rel="nofollow" rel="nofollow" rel="nofollow" rel="nofollow" rel="nofollow" rel="nofollow" rel="nofollow" rel="nofollow" rel="nofollow" rel="nofollow">传智大前端</a>-->
<divid="box"></div>
<scriptsrc="jquery-1.12.4.js"></script>
<script>
$(function(){
$("#box").append('<ahref="http://web.itcast.cn" rel="nofollow" rel="nofollow" rel="nofollow" rel="nofollow" rel="nofollow" rel="nofollow" rel="nofollow" rel="nofollow" rel="nofollow" rel="nofollow" rel="nofollow" rel="nofollow" rel="nofollow" rel="nofollow" rel="nofollow" rel="nofollow" rel="nofollow" rel="nofollow">传智大前端</a>');
});
</script>
</body>
</html>
在程序语言中,节点是XML文件中有效而完整的结构的最小单元。在作图软件Maya中,节点是最小的单位。每个节点都是一个属性组。节点可以输入,输出,保存属性。