| 序号 | 关闭代码 | 需要确认 | 无任何作用 | 无需确认 | 测试 |
|---|---|---|---|---|---|
| 1 | window.close() | IE7 | firefox,chrome, safari | Opera | Close |
| 2 | window.opener=null; window.open('','_self'); window.close(); | firefox | IE7,Opera, chrome,safari | Close | |
| 3 | window.open('','_self'); window.close(); | firefox | IE7,Opera, chrome,safari | Close | |
| 4 | window.opener=null; window.close(); | IE7 | firefox,safari | chrome,Opera | Close |
| 5 | var opened=window.open('about:blank','_self'); opened.opener=null; opened.close(); | firefox | safari,IE7, chrome,Opera | Close | |
| 6 | var opened=window.open('about:blank','_self'); opened.close(); | safari,firefox | firefox,IE7, chrome,Opera | Close |
本文介绍六种不同方式来关闭浏览器窗口的方法,并详细说明了这些方法在主流浏览器如IE7、Firefox、Chrome、Safari和Opera中的适用性和效果。
4988

被折叠的 条评论
为什么被折叠?



