本文主要和大家分享js实现关闭网页的代码,希望能帮助到大家。
很简单的关闭本页面的方法,没有其他额外的提示:
window.opener=null; //返回对创建该窗口的 Window 对象的引用。window.open('', '_self'); //方法用于打开一个新的浏览器窗口或查找一个已命名的窗口。window.close() //用于关闭浏览器窗口。_self是在本页面打开一个新页面的意思,可以参考看target的四种属性_prarent,_blank,_selft,_top
很简单的关闭本页面的方法,没有其他额外的提示:
window.opener=null; //返回对创建该窗口的 Window 对象的引用。window.open('', '_self'); //方法用于打开一个新的浏览器窗口或查找一个已命名的窗口。window.close() //用于关闭浏览器窗口。_self是在本页面打开一个新页面的意思,可以参考看target的四种属性_prarent,_blank,_selft,_top
相关推荐:










