Recently, I made a jsp webpage to open an Internet Explorer without menu bar. I thought of using window.open to open it. But found that if the previously opened form was not closed,When a form is opened, a new form is opened on a form that was not previously closed,The previous window is replaced.After searching the information and testing, it is found that if the specified form name and the current form have the same name when opening the form, it will be opened on that form.For example:
window.open ("view_svg.jsp?ukey =<%= ukey%>&itemid =<%= itemid%>&charset=utf-8", "newwindow", "height =" 100%",, toolbar=no, location=no, directories=no, menubar=no, scrollbars=no, resizable=no, status=no ");
Each window opened in this way is opened in a window named newwindow.
Note:The name of the form is different from the title.
1.window.open (urlstr, "_ blank", "");
The _blank parameter indicates that a new window is opened.
2. You can also use the following method to make the form open differently each time.
The open () method looks for an existing or newly created browser window.
window.open ([url], [window name], [parameter string])
url:optional parameter,The URL or path of the web page to display in the window.If this parameter is omitted,Or its value is an empty string,Then the window will not display any documents.
Window name:optional parameter,The name of the window that was opened.
1. The name consists of letters, numbers, and underscore characters.
2. "_top", "_blank", "_selft" are names with special meaning.
_blank:Show landing page in new window
_self:Show landing page in current window
_top:Display the landing page in the upper window of the frame page
3. Only one window of the same name can be created,To create multiple windows, the name cannot be the same.
4.name cannot contain spaces.
Parameter string:optional parameter,Set window parameters,Each parameter is separated by a comma.
For example:open website, size is 300px * 200px, no menu, no toolbar,No status bar,Window with scroll bar:
Friendly reminder:We must pay attention to browser compatibility issues here.
- Talking about filereader and windowURLcreateObjectURL for js picture front-end preview
- Implementation method of js to obtain window object in iframe
- Tutorial for setting up Windows + Nodejs + MySQL environment through node-mysql
- python - you may need to restart the kernel to use updated packages error
- php - coincheck api authentication doesn't work
- php - i would like to introduce the coincheck api so that i can make payments with bitcoin on my ec site
- [php] i want to get account information using coincheck api
- the emulator process for avd pixel_2_api_29 was killed occurred when the android studio emulator was started, so i would like to
- python 3x - typeerror: 'method' object is not subscriptable
- i want to call a child component method from a parent in vuejs
- xcode - pod install [!] no `podfile 'found in the project directory
- dart - flutter: the instance member'stars' can't be accessed in an initializer error