摘要: 在各大浏览器中,除Mozilla浏览器外,几乎都支持一个元素的属性:innerText。我们可以通过它来快速获取某个元素的内的文本。比如:<p id="test"><strong><font color="red">Hello</font> , world!</strong></p>我们使用代码:alert((document.getElementById("test")).innerText)在IE、Chrome中,均能获取到“Hello , world!”,但 阅读全文
posted @ 2010-12-31 19:13 北磬 阅读(996) 评论(2) 推荐(0) 编辑

博客作者:北馨书生