摘要:
style加样式是加在行间,取样式也是在行间取; 我们来看下面这段代码: 1 2 3 4 5 13 19 20 21 22 23 24 这段代码定义了一个按钮和一个元素,并在13 19 20 21 22 23 24... 阅读全文
摘要:
Understanding a NodeList object and its relatives, NamedNodeMap and HTMLCollection, is critical to a good understanding of the DOM as a while. Each ... 阅读全文
摘要:
The childNodes property contains all of the immediate children of the element. There is a significant difference between browsers regarding the iden... 阅读全文
摘要:
上图来自于《JavaScript权威指南(第六版)》P375受到上图的启发,写了如下测试代码:1 var head = document.getElementsByTagName("head");2 console.log(Object.getPrototypeOf(Object.getProtot... 阅读全文
摘要:
首先贴上代码:1 console.log(Object.getPrototypeOf(document));2 console.log(Object.getPrototypeOf(Object.getPrototypeOf(document)));在FF上的运行结果如下所示:第一行代码返回的是一个H... 阅读全文
摘要:
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... 阅读全文
摘要:
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 ... 阅读全文
摘要:
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... 阅读全文
摘要:
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... 阅读全文
摘要:
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... 阅读全文