Example of parsing and using the window.open full screen command in JS

  • 2020-03-30 00:49:22
  • OfStack

I. code samples

 
window.open(url,' A new window ','width='+(window.screen.availWidth-10)+',height='+(window.screen.availHeight-30)+',top=0,left=0,resizable=yes,status=yes,menubar=no,scrollbars=yes'); 

Ii. Command analysis
Window. The open
Command to pop up a new window

Page. The HTML
File name of the pop-up window

newwindow
The name of the popup window (not the file name)

Height = 100
Window height

Width = 400
Window width

Top = 0
The window is the pixel value at the top of the screen

Left = 0
The window is the pixel value to the left of the screen

The toolbar = no
Whether to display toolbar or not, yes is to display

The menubar, scrollbars
Represents the menu bar and the scroll bar

The resizable = no
Is it allowed to change the window size? Yes is allowed

Location = no
Whether to display the address bar, yes is allowed

The status = no
Whether to display the information in the status bar (usually the file has been opened), yes is allowed


Related articles: