In javascript, window. open opens a new window (different names) in the original window _ javascript tips

Source: Internet
Author: User
Tags ukey
This article introduces the use of window. open opens a new window in the original window, involving win. open new window related knowledge, interested in this article, refer to the recently made a JSP page requires to open a menu toolbar without IE, think of using window. open. However, if the previously opened form is not closed, a new form is opened on the previously closed form, so that the previous window is replaced. After searching materials and testing, it is found that if the specified form name and the current form name are the same when the form is opened, it will be opened on that form. For example:

Window. open ("view_svg.jsp? Ukey = <% = ukey %> & itemID = <% = itemID %> & charset = UTF-8 "," newWindow "," height = '000000', width = '000000 ', toolbar = no, location = no, directories = no, menubar = no, scrollbars = no, resizable = no, status = no ");
In this way, each form is opened in a form named newWindow.

Note: The form name and title are different.

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 each opened form have different names.

<% Random rd = new Random (); int I = rd. nextInt (100) + 1; String ranStr = String. valueOf (I); %>
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.