弹出窗口问题:只多出一个confirm判断,一种弹出正常,一种被google拦截?
<html>
<head>
<meta http-equiv= "Content-Language " content= "zh-cn ">
<meta http-equiv= "Content-Type " content= "text/html; charset=gb2312 ">
<meta name= "GENERATOR " content= "Microsoft FrontPage 4.0 ">
<meta name= "ProgId " content= "FrontPage.Editor.Document ">
<title> 窗口一 </title>
</head>
<body>
<SCRIPT LANGUAGE= "JavaScript ">
<!--
function popwin(id)
{
window.open(id, "popwindow ", "top=50,left=50,height=200;width=200,scrollbar=no,staus=no ");
}
function test(id){
if(confirm( "测试 ")){
popwin(id);
}
}
//-->
</SCRIPT>
<p> <u onclick=test( 'http://www.blueidea.com ')> 窗口一 </u> </p>
<p> <u onclick=popwin( 'http://www.51windows.com ')> 窗口二 </u> </p>
</body>
</html>
=========================================
如果安装了google工具条,窗口一会被屏蔽掉,窗口二正常显示,为何会这样呢?
------解决方案--------------------把两个地址都设置成同样的试试看。
<a onclick=popwin( 'http://www.51windows.com ')> 窗口二 </a>
<a onclick=test( 'http://www.51windows.com ')> 窗口一 </a>