html弹出固定大小的窗口(HTML pops up a fixed size window)
html弹出固定大小的窗口(HTML pops up a fixed size window)
Would you like a window with a fixed size after clicking?
[1, the most basic pop-up window code]
Window.open ('page.html')
-- >
Since this is a section of Javascripts code, they should be placed between . acts on some version of the low browser, the browser will not be in the old label code as text display. Get into this good habit. Window.open ('page.html') is used to control the pop-up window page.html, if page.html is not with the main window on the same path, should be written in front of the path, the absolute path (http://) and relative path (/) can. You can use both single and double quotes, but don't mix them. Any position of this piece of code can be added to HTML, can be between
and , can also be more before the earlier implementation, especially the page code, and want to make the page pops up as far as possible to put forward earlier.[2, after setting up pop-up window]
Let's talk about the settings of the pop-up window. Just add a little more to the code above. Let's customize the appearance, size, and position of the pop-up window to fit the page.
Window.open ('page.html','newwindow','height=100, width=400, top=0, left=0, toolbar=no, menubar=no, scrollbars=no, resizable=no, location=n, O, status=no') / / this sentence should be written out in a row
-- >
Parameter interpretation:
Window.open pop-up new window command;
'page.html'pop-up window file name;
'newwindow'pop-up window name (not file name), non required, available empty instead;
Height=100 window height;
Width=400 window width;
Top=0 window is the pixel value above the screen;
Left=0 window is the pixel value from the left of the screen;
Does toolbar=no display toolbars, and yes is display?;
Menubar, scro