Among them: pageURL is the sub-window path name is the sub-window handle parameters is the window Parameters (each parameter is separated by commas)
3. Parameters
Where yes/no can also use 1/0; pixel value is a specific value, in pixels.
Parameter | Value range| Description| | alwaysLowered | yes/no | The specified window is hidden behind all windows > Depended | yes/no | Whether to close at the same time as the parent window Directories | yes/no | Whether the directory bar of Nav2 and 3 is visible Height | pixel value | Window height hotkeys | yes/no | in A safe exit hotkey is set in a window without a menu bar innerHeight | pixel value | pixel height of the document in the window innerWidth | pixel value | pixel width of the document in the window location | yes/no | location bar Is it visible? Menubar | yes/no | Is the menu bar visible? OuterHeight | pixel value | Set the pixel height of the window (including decorative borders) pixel width of the decorative border resizable | yes/no | whether the window size can be adjusted screenX | pixel value | pixel length of the window from the left border of the screen screenY | pixel value | Pixel length scrollbars | yes/no | Whether the window can have a scroll bar titlebar | yes/no | Whether the window title bar is visible toolbar | yes/no | Whether the window toolbar is visible Width | pixel value | pixel width of the window z-look | yes/no | whether the window floats on top of other windows after it is activated Let me take you to analyze its mystery. [1. The most basic pop-up window code] In fact, the code is very simple:
[Ctrl A Select all Note: If you need to introduce external Js, you need to refresh to execute it ]Because it is a piece of javascripts code , so they should be placed between the . are effective for some older browsers. In these old browsers, the code in the tag will not be displayed as text. Develop this good habit. window.open ('page.html') is used to control the pop-up of a new window page.html. If page.html is not in the same path as the main window, the path should be written in front, the absolute path (http Both ://) and relative paths (.. /) are acceptable. You can use either single quotes or double quotes, just don’t mix them. This piece of code can be added anywhere in the HTML, between and , and between . The earlier it is, the earlier it will be executed, especially if the page code is long. , and if you want the page to pop up earlier, put it as far forward as possible. 【2. Pop-up window after setting】 Let’s talk about the settings of pop-up window. Just add a little more to the code above. Let’s customize the appearance, size, and pop-up position of this pop-up window to suit the specific conditions of the page.
[Ctrl A select all Note: If you need to introduce external Js, you need to refresh to execute ] 参数解释: js脚本结束 【3、用函数控制弹出窗口】 下面是一个完整的代码。
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn