www.w3cking.com
摘要: innerHTML与innerText的用法与区别用法:<div id="test"> <span style="color:red">test1test2</div>在JS中可以使用:test.innerHTML: 也就是从对象的起始位置到终止位置的全部内容,包括Html标签。 上例中的test.innerHTML的值也就是“<span style="color:red">test1test2 ”。test.innerText: 从起始位置到终止位置的内容, 但它去除Html标签 上例 阅读全文
posted @ 2013-03-18 11:23 Code-king 阅读(383) 评论(0) 推荐(0) 编辑
www.w3cking.com