当前位置:编程学习 > JS >>

jquery 判断弹出窗口是否被拦截

jquery 判断弹出窗口是否被拦截

<!doctype html public "-//w3c//dtd xhtml 1.0 transitional//en" "http://www.w3.org/tr/xhtml1/dtd/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>无标题文档</title>
</head>
<script language="网页特效1.2" type="text/javascript1.2">
var test=0;
function testshowwindow()
{
//禁用了activex控件你就不记录哈
if(test)
{
if(!test.closed){
alert('窗口弹出了');
test.close();
}else{
alert('没有弹出噶');
}
}
//这个你加到 没有弹出时再弹出看看呢
test = window.open('http://mb.zhaoxi.net','test','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbar=no,resizable=no,copyhistory=yes,width=400,height=600,left=100,top=100');
//这里你可以记录哈 (可在弹出时记录)
}
</script>
</head>
<body>
<a href="#" onclick="javascript:testshowwindow();"><input type="button" name="" value="弹出窗口" onclick="javascript:testshowwindow();"></a>
<body>
</body>
</html>
补充:网页制作,jquery 
CopyRight © 2012 站长网 编程知识问答 www.zzzyk.com All Rights Reserved
部份技术文章来自网络,