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