摘要: style加样式是加在行间,取样式也是在行间取; 我们来看下面这段代码: 1 2 3 4 5 13 19 20 21 22 23 24 这段代码定义了一个按钮和一个元素,并在13 19 20 21 22 23 24... 阅读全文
posted @ 2015-05-28 20:29 林大勇 阅读(592) 评论(0) 推荐(0) 编辑
摘要: Understanding a NodeList object and its relatives, NamedNodeMap and HTMLCollection, is critical to a good understanding of the DOM as a while. Each ... 阅读全文
posted @ 2015-05-22 10:04 林大勇 阅读(182) 评论(0) 推荐(0) 编辑
摘要: The childNodes property contains all of the immediate children of the element. There is a significant difference between browsers regarding the iden... 阅读全文
posted @ 2015-05-21 21:07 林大勇 阅读(211) 评论(0) 推荐(0) 编辑
摘要: 上图来自于《JavaScript权威指南(第六版)》P375受到上图的启发,写了如下测试代码:1 var head = document.getElementsByTagName("head");2 console.log(Object.getPrototypeOf(Object.getProtot... 阅读全文
posted @ 2015-05-21 13:38 林大勇 阅读(869) 评论(0) 推荐(0) 编辑
摘要: 首先贴上代码:1 console.log(Object.getPrototypeOf(document));2 console.log(Object.getPrototypeOf(Object.getPrototypeOf(document)));在FF上的运行结果如下所示:第一行代码返回的是一个H... 阅读全文
posted @ 2015-05-21 13:14 林大勇 阅读(4940) 评论(0) 推荐(1) 编辑
摘要: The Browser Object Model(BOM) is based on the window object, which represents the browser window and the viewable page area. The window object doubl... 阅读全文
posted @ 2015-05-20 11:31 林大勇 阅读(142) 评论(0) 推荐(0) 编辑
摘要: Intervals 1 var num = 0; 2 var max = 10; 3 4 function incrementNumber(){ 5 num++; 6 7 // if the max has not been reached, set another timeout ... 阅读全文
posted @ 2015-05-19 22:02 林大勇 阅读(142) 评论(0) 推荐(0) 编辑
摘要: IE, Safari, Opera, and Chrome all provide screenLeft and screenTop properties that indicate the window's location in relation to the left and top of... 阅读全文
posted @ 2015-05-19 17:10 林大勇 阅读(547) 评论(0) 推荐(0) 编辑
摘要: If a page contains frames, each frame has its own window object and is stored in the frames collection. Within the frames collection, the window obj... 阅读全文
posted @ 2015-05-19 16:56 林大勇 阅读(175) 评论(0) 推荐(0) 编辑
摘要: At the core of the BOM is the window object, which represents an instance of the browser. The window object serves a dual purpose in browsers, actin... 阅读全文
posted @ 2015-05-19 15:34 林大勇 阅读(145) 评论(0) 推荐(0) 编辑