Window. The opener=null;
Window. The open (', 'love');
Window. The close ();
Home only chrome, Edge browser, using the above method is bad to use,
Error message is "Scripts may close only the Windows that were the opened by them"
If the code change:
Window. The opener=null;
Window. The open (" about: blank ', 'love');
Window. The close ();
Two browser will close the current page, but left a about: where is the blank page,
Excuse me how can I in chrome, Edge of perfect close a page?
CodePudding user response:
& lt; ! DOCTYPE html>
<meta charset="utf-8" & gt;
<script>
The function closewind () {
Window. The opener=null;
Window. The open (', 'love');
Window. The close ();
}
</script>
<body>