03 2010 档案

摘要: 获取DOM节点的方法有很多,如常用的getElementById()、getElementsByTagName(),前者返回一个节点元素,后者返回的是节点的集合。看似相同,实际上其中大有文章:1、getElementById()返回的节点可以保存到变量中,即便使用removeChild()方法移除,也能再通过保存的变量使用该节点。测试下面的代码:2、getElementsByTagName()返回...阅读全文
posted @ 2010-03-29 11:44 七哥 阅读(76) | 评论 (0) 编辑
摘要: Javascript objects and arrays are both incredibly useful. They’re also incredibly easy to confuse with each other. Mix in a few objects that look like arrays and you’ve got a recipe for co...阅读全文
posted @ 2010-03-05 10:12 七哥 阅读(116) | 评论 (0) 编辑