IE,firefox(火狐)浏览器无提示关闭窗口js实现代码小结
<script type="text/javascript"> function closeme(){ var browserName=navigator.appName; if (browserName=="Netscape") { window.open('','_parent',''); window.close(); } else if (browserName=="Microsoft Internet Explorer") { window.opener = "whocares"; window.close(); } } </script> <input type="button" value="close me 3" onclick="closeme();"/>
<script>
function CloseWin(){
window.opener=null;
window.open('','_self');
window.close();
}
</script>
<input type=button value="关闭" onclick="CloseWin()">
详细出处参考:http://www.jb51.net/article/20092.htm