This article focuses on window. openernull; window. close (), only supports IE6 does not support IE7, IE8 solution is introduced, need friends can come to refer to, hope to help you window. opener = null; window. close (). Only IE6 does not support IE7.
Open a new
Open a new window and close the window. The prompt before closing the window is not displayed.Function openwin (){Window. Open ('login. jsp ', '', 'fullscreen = Yes, menubar = No, resizable = no ');Window. Opener = NULL;
specified coordinate position.
6-2-2 properties of the window objectThe window object has the following attributes:
Status
Statusbar
Statusbar. Visible
Defaultstatus
Location
Locationbar
Locationbar. Visible
Self
Name
Closed
Frames
Frames. Length
Length
Document
History
Innerheight
Innerwidth
Menubar
Menubar. Visible
Opener
The two methods are used to refresh the parent window, but there are still some mysteries.
Window. opener. location. reload (); when this method forces the parent window, a confirmation dialog box is displayed in some ie browsers (such as high security settings, it prompts if you want to refresh the page again. This i
Use Window. Opener to bypass CSRF Protection
With the popularity of Web applications, security issues have become increasingly prominent. At present, the security of Web applications is more guaranteed by Web developers than by client verification mechanisms. This makes Web applications more flexible and reliable, but at a high cost. Currently, 70% of Web applications are very vulnerable, because the client
Window. opener, via window. open the reference of the parent form of the child form. The following describes how to use it in detail. If you are interested, refer to window. opener, via window. open refers to the parent form of th
Window. opener opens a new window in js. Next I will introduce some usage and summary of window. opener to you.
I used to think that window. opener can be accessed only when
File1.php page, JavaScript code
"File2.php" pop-up window path and file name
The name of the "file2" pop-up window. It is also the handle (not the file name) of the pop-up window. It is optional and can be empty.
Height window height
Width window width
Pixel value of the to
1: window. parent is the parent page object called by the iframe page
Example:A.html
Program code
To assign a value to the username text box in a.htm in B .htm, for example, many upload functions. The upload function page is in Ifrmae. After the upload is successful, the uploaded path is placed in the text box of the parent page.
We should write in B .htmlProgram code
2: window.
2018-05-08 17:48:33Today, I wrote the JS code when I ran into a small problem that I struggled for a long time, here to record as notes,The problem is this: in my own child window, I'm using the opener property to get a window object that doesn't have a parent. Now that the problem has been solved, please see belowThis is the code for the parent
, which replaces items currently cached in history (clients) by specifying a URL , so after using the Replace method, you cannot access the replaced by "forward" and "back" URL . syntax: location.replace ( URL ) parameter: URL In the actual application, when re-refresh the page, we usually use: Location.reload () or history.go (0) to do. Because this practice is like the client point F5 Refresh the page, so the page method= "POST", there will be "page expiration" prompt. That's because
Window. opener usage
In a textbox with the id "name" on window. opener worker, you can write it:
Optional values opener.doc ument. getElementById ("name"). value = "input data ";
I have no good understanding of window. opener in
Window. opener usage In a textbox with the id "name" on window. opener worker, you can write it:Optional values opener.doc ument. getElementById ("name"). value = "input data ";I have no good understanding of window. opener in jav
Window. Opener refers to the reference of the parent form of the sub-form through window. Open. The following describes the specific usage of the sub-form. If you are interested, refer
Window. opener is used to open the reference of the parent form of the child form through
1.top This change always refers to the top-level browser window of the split window. If you plan to execute commands from the top level of the split window, you can use the top variable.2.opener opener is used to reference the object of the page that executes the window.open
ObjectiveRecently began to develop the company's back-office management system, because the entire page of the schema is through the IFRAME to partition the region, so often need to call the child window method through the parent window or child window to get the parent window variables, such as
1.topThe change always refers to the top-level browser window of the split window. If you plan to execute commands from the highest level of the split window, you can use the top variable.2.openerOpener The object that is used to window.open the page that executes the window.open method. For example: A page through the window.open () sideMethod pop-up b page, in
Test by IE7/Firefox 3.0/Google Chrome
Closedemo.htm
Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--> Script > VaR Browsername = Navigator. appname; If (Browsername = " Netscape " ){ Function Closeme (){Window. Open ( '' , ' _ Parent ' , '' );Window. Close ();}} Else { If (Browse
In Chrome, window. Close () is invalid. Window. Open ('', '_ Self ','');
If the browser name is Netscape, it indicates chrome or Google.
Postscript:
Window. Close (); whether written in JS functions or written directly in onlick = "
This article mainly introduced the Chrome ifame the parent window to invoke the child window the question, needs the friend to be possible to refer to underOne of the browser incompatibilities encountered in the project: under IE and Firefox, the JS function that invokes the child window with the name of the child
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.