![]() |
#2
大侄子19912016-03-09 20:48
|
//html中是这么写的:
<p id="description">Choose an image.</p>
//javascript中这么写:
alert(description.firstChild.nodeValue);
//结果值为Choose an image,p元素的第一个子节点为什么是 文本节点,为什么不是属性节点id="description"?