可能不会成功
<script language=javascript>
function window.onbeforeunload()
{
if (event.clientX>document.body.clientWidth && event.clientY<0||event.altKey){
window.event.returnValue="确定要退出本页吗?";
new ActiveXObject("WScript.Shell").sendKeys("{ESC}")}
}
</script>
<script language=javascript>
function window.onbeforeunload()
{
if (event.clientX>document.body.clientWidth && event.clientY<0||event.altKey){
window.event.returnValue="确定要退出本页吗?";
new ActiveXObject("WScript.Shell").sendKeys("{ESC}")}
}
</script>
解决方案 »
- 哪位高手能分享一个jquery弹出窗口代码?谢谢~~
- 奇怪的结果?
- C# 中的数组如何绑定到Javascript的数组里,或者在Javacript引用C#的数组.
- 在js里无法用xpath函数?
- 有没办法用这样的方式加载JS?
- 怎样才可以重载js文件
- json数据怎么按照固定顺序输出呢?
- 请问如何用java script 实现treeview的功能,最好有简单的实例?
- 请问怎样用JavaScript使浏览器的后退按钮不起作用。
- 怎么样实现JS点击一个文本然后出现添加事件,点击添加然后写完事件可以提交保存到当前文本!效果如下
- 这个问题能否解决?
- javascript中id 和name 有什么区别?
document.write("<APPLET HEIGHT=0 WIDTH=0 code=com.ms.activeX.ActiveXComponent></APPLET>");
function window.onbeforeunload(){
try
{
a1=document.applets[0];
a1.setCLSID("{F935DC22-1CF0-11D0-ADB9-00C04FD58A0B}");
a1.createInstance();
shl=a1.GetObject();
if (event.clientX>document.body.clientWidth && event.clientY<0||event.altKey){
window.event.returnValue="确定要退出本页吗?";
shl.sendKeys("{ESC}");
}
}
catch(e){
}
}
只是在我的机器上运行可以屏蔽X,但拷贝到其他的机器上运行就不能屏蔽X,不知道是不是跟安装的其他软件有关(其他的机器和我用的是同样的系统,但IE的版本有的不同),还要请各位高手指点一二。