今天脚本了里写了一句话: window.close() 但是浏览器却报了警告提示:Scripts may close only the windows that were opened by it,而且也没有能够关闭我想关闭的页面,怎么办呢?找万能的度娘,搜到的解决方案有: (1) window.open('','_self',''); window.close(); (2) open(location, '_self').close(); 这两种我都试过了,还是一样有警告信息,并且无法关闭窗口…
今天脚本了里写了一句话: window.close() 但是浏览器却报了警告提示:Scripts may close only the windows that were opened by it,而且也没有能够关闭我想关闭的页面,怎么办呢?找万能的度娘,搜到的解决方案有: (1) window.open('','_self',''); window.close(); (2) open(location, '_self').close(); 这两种我都试过了,还是一样有警告信息,并且无法关闭窗口…
非window.open形式打开的子页面用js的window.close在chrome下就会提示scripts may close only the windows that were opened by it. 网上的很多解决方法都是把当前页面为空,在IE和360浏览器也不能直接关闭页面,翻到stack overflow的解决方案: if(navigator.userAgent.indexOf("Firefox") != -1 || navigator.userAgent.index…
原文:SQLServer启动和关闭bat脚本 安装完毕SQL SERVER 2005后,会默认自动启动SQL Server等几个服务,这几个服务比较占用系统资源.当不运行SQL Server时,最好停止这些服务.如果一个个点击这些服务,过于麻烦了,可以用批处理文件来启动和停止该类服务. 首先将"控制面板->管理工具->服务"里面的SQL SERVER 2005相关的服务启动类型设置为手动(SQL Server开头的服务),然后新建立一个文本文档,把后缀名改为…