Đang chuẩn bị liên kết để tải về tài liệu:
JavaScript Bible, Gold Edition part 50

Đang chuẩn bị nút TẢI XUỐNG, xin hãy chờ

JavaScript Bible, Gold Edition part 50. This book will bring programmers and non-technical professionals, including casual programmers and scripters, painlessly up to speed on all aspects of mastering JavaScript. Key topics include programming fundamentals, JavaScript language elements and how to use them effectively, and how to easily and efficiently add powerful new functionality to HTML documents and Java applets. | The Document and Body Objects User interaction is a vital aspect of client-side JavaScript scripting and most of the communication between script and user takes place by way of the document object and its components. Understanding the scope of the document object within each of the object models you support is key to implementing successful cross-browser applications. Review the document object s place within the original object hierarchy. Figure 18-1 clearly shows that the document object is a pivotal point for a large percentage of JavaScript objects. In This Chapter Accessing arrays of objects contained by the document object Writing new document content to a window or frame Using the BODY element for IE window measurements window frame self top parent Figure 18-1 The basic document object model hierarchy 340 Part III Document Objects Reference In fact the document object and all that it contains is so big that I have divided its discussion into many chapters each focusing on related object groups. This chapter looks at the document object and body object which have conceptual relationships while each of the succeeding chapters in this part of the book details objects contained by the document object. I must stress at the outset that many newcomers to JavaScript have the expectation that they can on the fly modify sections of a loaded page s content with ease replace some text here change a table cell there. However understanding that these capabilities an important part of what is called Dynamic HTML are available only in more recent browsers specifically IE4 and NN6 is very important. Not only do these browsers expose every HTML element to script languages but they also automatically reflow the page when the size of content changes under script control. Pages on all previous browsers are limited to a small set of modifiable objects such as images and form elements. NN4 also has a layer object that is useful for DHTML but that object is unique to NN4 only. If .