This article describes the JS implementation of the current page is closed without pop-up prompt box method. Share to everyone for your reference, specific as follows:
Closes the current page and opens a new page (not prompted)
function Closewinandopen (URL) {
var swinname = "LR" +parseint (Math.random () * 100000000);//using random number processing Winname
window.open (Url,swinname, ' toolbar=no,location=no,directories=no,status=yes,menubar=no,scrollbars=no,resizable= Yes,copyhistory=yes ');
Closewin ();
}
Close the current page:
function Closewin () {
window.opener=null;
window.open (', ' _self ');
Window.close ();
}
To close the parent page:
Copy Code code as follows:
Response.Write ("<script>window.top.opener=null;window.parent.close ();</script>")
(Window.top.close () or make)
Set Window.opener=null can not display: "The Web page you are viewing is trying to close the window, whether to close the window"
More readers interested in JavaScript-related content can view the site topics: "JavaScript switching effects and tips summary", "JavaScript Search Algorithm Skills Summary", "JavaScript animation effects and tips summary", " JavaScript error and debugging skills Summary, JavaScript data structure and algorithm skills summary, JavaScript traversal algorithm and skills summary and JavaScript mathematical calculation usage Summary
I hope this article will help you with JavaScript programming.