JavaScript Bible, Gold Edition part 41

JavaScript Bible, Gold Edition part 41. 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. | 248 Part III Document Objects Reference parent Value Window object reference Read-only NN2 NN3 NN4 NN6 IE3 J1 IE3 J2 IE4 IE5 Compatibility The parent property and the top property that follows later in this section comes into play primarily when a document is to be displayed as part of a multiframe window. The HTML documents that users see in the frames of a multiframe browser window are distinct from the document that specifies the frameset for the entire window. That document though still in the browser s memory and appearing as the URL in the location field of the browser is not otherwise visible to the user except in the Source View . If scripts in your visible documents need to reference objects or properties of the frameset window you can reference those frameset window items with the parent property do not however expand the reference by preceding it with the window object as in as this causes problems in early browsers . In a way the parent property seems to violate the object hierarchy because from a single frame s document the property points to a level seemingly higher in precedence. If you didn t specify the parent property or instead specified the self property from one of these framed documents the object reference is to the frame only rather than to the outermost framesetting window object. A nontraditional but perfectly legal way to use the parent object is as a means of storing temporary variables. Thus you could set up a holding area for individual variable values or even an array of data. These values can then be shared among all documents loaded into the frames including when documents change inside the frames. You have to be careful however when storing data in the parent on the fly that is in response to user action in the frames . Variables can revert to their default values that is the values set by the parent s own script if the user resizes the window in early browsers. A child window can also call a .

Không thể tạo bản xem trước, hãy bấm tải xuống
TỪ KHÓA LIÊN QUAN
TÀI LIỆU MỚI ĐĂNG
114    97    3    27-06-2024
Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.