Đang chuẩn bị liên kết để tải về tài liệu:
the book of javascript 2nd edition phần 3

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

Tham khảo tài liệu 'the book of javascript 2nd edition phần 3', công nghệ thông tin, kỹ thuật lập trình phục vụ nhu cầu học tập, nghiên cứu và làm việc hiệu quả | Table 5-1 lists all the different window.open features you can play with. Try experimenting with different ones to see what they do. Except for the features that deal with pixels for example height all you have to do is type the feature name inside the third parameter s quotes. Some of the features apply to a specific browser the directories feature for example works only on Netscape. Table 5-1 JavaScript Window Features Feature Effect directories Adds buttons such as What s New and What s Cool to the menu bar. Some browsers ignore this feature. Others add different buttons. height X Adjusts the height of the window to X pixels. left X Places the new window s left border X pixels from the left edge of the screen. location Adds a location bar where the site visitor can enter URLs. menubar Adds a menu bar. resizable Controls whether the visitor can resize the window all Mac windows are resizable even if you leave this feature out. scrollbars Adds scroll bars if the contents of the page are bigger than the window. status Adds a status bar to the bottom of the window. Use the status property of the window object discussed later in this chapter to define what will be displayed in the status bar. toolbar Adds a standard toolbar with buttons such as back forward and stop. Which buttons are added depends on the browser being used. top X Places the window s top border X pixels from the top edge of the screen. width X Adjusts the window width to X pixels. Some Browsers and Computers Open Windows Differently The process of opening windows differs slightly depending on the browser and computer being used. For example JavaScript windows in Mozilla Safari and Opera browsers are always resizable so even if you leave that feature out of the string the window remains resizable. Another difference is that you can t hide the menu bar on a Macintosh. Closing Windows If you ve opened a window called my_window and want to close it later in the script use the close method my_window.close