Fixed the problem of closing the showModalDialog window pop-up screen.

Source: Internet
Author: User

The window. showModalDialog () method is used to prevent the parent window from being operated. However, when the showModalDialog window is closed, a new window is always displayed. I started to think of this IE bug and later found that I wrote less <base target = "_ self"> on the page. Simply query the target attribute to the end:
Syntax

HTML <ELEMENTTARGET= STarget...>
Scripting Object.Target[=STarget]

Possible Values

STarget StringThat specifies or distinct es one of the following values.

Name The name of the target window or frame.
_ Blank Load the linked document into a new blank window. This window is not named.
_ Media Load the linked document into the HTML content area of the Media Bar. Available in Internet Explorer 6 or later.
_ Parent Load the linked document into the immediate parent of the document the link is in.
_ Search Load the linked document into the browser search pane. Available in Internet Explorer 5 or later.
_ Self Default. Load the linked document into the window in which the link was clicked (the active window ).
_ Top Load the linked document into the topmost window.

The property is read/write. The property has a default value of _ self.

Expressions can be used in place of the preceding value (s), as of Microsoft Internet Explorer 5. For more information, see About Dynamic Properties.

Remarks

If there is no existing window or frame with the same name as specified in the target, a new window is opened with a name equal to the value of the target.
The window name is an optional argument in the open scripting method.

The property is read/write. The property has a default value of _ self. This statement indicates _ self by default. Why must it be added before use? I will study it later.

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.