tailieunhanh - JavaScript in 10 Simple Steps or Less 2007 phần 5

ông cửa sổ đối tượng cung cấp truy cập đến tài sản và phương pháp có thể được sử dụng để có được thông tin về cửa sổ đang mở, cũng như thao tác các cửa sổ và thậm chí mở cửa sổ mới. Đối tượng này cung cấp tính năng cho phép bạn truy cập vào các khung hình trong một cửa sổ | 236 Part 5 Task Using the Window Object The window object provides access to properties and methods that can be used to obtain information about open windows as well as to manipulate these windows and even open new windows. note The property reflects the current text in the status bar at the bottom of the current window. By assigning a new text string to this property you can override the default text displayed in the status bar with your own text. This object offers properties that allow you to access frames in a window access the window s name manipulate text in the status bar and check the open or closed state of the window. The methods allow the user to display a variety of dialog boxes as well as to open new windows and close open windows. Among the features of the window object are the following Creating alert dialog boxes Creating confirmation dialog boxes Creating dialog boxes that prompt the user to enter information Opening pages in new windows Determining window sizes Controlling scrolling of the document displayed in the window Scheduling the execution of functions The window object can be referred to in several ways Using the keyword window or self to refer to the current window where the JavaScript code is executing. For instance and refer to the same method. Using the object name for another open window. For instance if a window is associated with an object named myWindow would refer to the alert method in that window. The following steps illustrate how to access the window object by changing the text displayed in the current window s status bar 1. In the body of the document create a script block with opening and closing script tags script language JavaScript script 2. In the script block access the property script language JavaScript script 3. Assign new text to display to the property in the same way as assigning a text string to a variable so that the .

TỪ KHÓA LIÊN QUAN
crossorigin="anonymous">
Đã 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.