前端开发

 首页 > 前端开发 > javascript > js window.close关闭窗口不提示代码

js window.close关闭窗口不提示代码

分享到:
【字体:
导读:
          在js中关闭窗口的命令是window.close,使用window.close关闭窗口都会提示确认,那么我们要如何实现window.close关闭窗口不提示呢,下面我来给各位朋友总结了一些解决办法。...


js window.close关闭窗口不提示代码

利用WebBrowser.ExecWB





js 代码function CloseWin() //这个不会提示是否关闭浏览器    


{     
window.opener=null;     
//window.opener=top;     
window.open("","_self");     
window.close();     
}
 
open.html
function open_complex_self() {     
  var obj_window = window.open('close.html', '_self');     
   obj_window.opener = window;     
   obj_window.focus();     
}    
 
//关闭IE6不提示



//关闭IE7不提示 
function closeie7(){ 
window.open('','_top'); 
window.top.close(); 
}


分享到:
iScroll下拉加载更多简单列子
isscroll移动端滚动插件,下面是加载更多列子 iScroll demo: simple var myScroll = null; var generatedCount = 0; function pullUpAction () { var el, li, i; el = document.getElementById('thelist'); for (i=0; i 10) { pullUpAction(); } ...
js获取当前日期时间及其它日期操作汇总
本文实例为大家分享了javascript时间操作的使用常见场景,供大家参考,具体内容如下 var myDate = new Date();  myDate.getYear(); //获取当前年份(2位)  myDate.getFullYear(); //获取完整的年份(4位,1970-????)  myDate.getMonth(); //获取当前月份(0-11,0代表1月)  myDate.getDate(); //获取当前日(1-31...
  •         php迷,一个php技术的分享社区,专属您自己的技术摘抄本、收藏夹。
  • 在这里……