如何在所有浏览器中使用javascript关闭标签(即IE10,Firefox,Chrome,Safari) [英] How to close tab using javascript in all browsers (i.e IE10, Firefox, Chrome, Safari)

查看:87
本文介绍了如何在所有浏览器中使用javascript关闭标签(即IE10,Firefox,Chrome,Safari)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要关闭页面加载页面。



我试过用



I need to close the page on pageload.

I tried With

$(document).ready(function(){
window.close();
});





仅限适用于IE浏览器。



我需要在所有浏览器上使用它。



It only works on IE .

I need to work it on all browsers.

推荐答案

document )。ready( function (){
window .close();
});
(document).ready(function(){ window.close(); });





它仅适用于IE。



我需要在所有浏览器上使用它。



It only works on IE .

I need to work it on all browsers.


这可能对你有帮助

window-close [ ^ ]
this might help you
window-close[^]


很酷的解决方案 [ ^ ]

请尝试以上解决方案。

这可能会对您有所帮助。

谢谢
Nice solution in SO[^]
Please try the above solution.
This might help you.
Thanks


这篇关于如何在所有浏览器中使用javascript关闭标签(即IE10,Firefox,Chrome,Safari)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆