function openDoc()
{
URL="page.php";
myleft=(screen.availWidth-500)/2;
mytop=150
mywidth=550;
myheight=420;
if(confirm("really?"))
{
window.open(URL,"page","height="+myheight+",width="+mywidth+",status=1,toolbar=no,
menubar=no,location=no,scrollbars=yes,top="+mytop+",left="+myleft+",resizable=yes");
}
}如果没有if那个判断,可以跳出窗口
但有了confirm后,点确定没有反应
{
URL="page.php";
myleft=(screen.availWidth-500)/2;
mytop=150
mywidth=550;
myheight=420;
if(confirm("really?"))
{
window.open(URL,"page","height="+myheight+",width="+mywidth+",status=1,toolbar=no,
menubar=no,location=no,scrollbars=yes,top="+mytop+",left="+myleft+",resizable=yes");
}
}如果没有if那个判断,可以跳出窗口
但有了confirm后,点确定没有反应
[code=JScript]function openDoc()
{
URL="page.php";
myleft=(screen.availWidth-500)/2;
mytop=150
mywidth=550;
myheight=420;
if(confirm("really?"))
{
window.open(URL,"page","height="+myheight+",width="+mywidth+",status=1,toolbar=no, menubar=no,location=no,scrollbars=yes,top="+mytop+",left="+myleft+",resizable=yes");
}
} openDoc();[code]
<script type="text/javascript">
function openDoc()
{
URL="page.php";
myleft=(screen.availWidth-500)/2;
mytop=150
mywidth=550;
myheight=420;
if(confirm("really?"))
{
window.open(URL,"page","height="+myheight+",width="+mywidth+",status=1,toolbar=no,menubar=no,location=no,scrollbars=yes,top="+mytop+",left="+myleft+",resizable=yes");
}
} </script>
<input type="button" value=" click" onclick="openDoc()"/>
我的ie6.0下面不可以,在firefox下面可以,请问有没有什么解决方法?
function openDoc()
{
URL="http://www.google.com";
myleft=(screen.availWidth-500)/2;
mytop=150
mywidth=550;
myheight=420;
alert(confirm("really?"));
if(confirm("really?"))
{
window.open(URL,"page","height="+myheight+",width="+mywidth+",status=1,toolbar=no,\
menubar=no,location=no,scrollbars=yes,top="+mytop+",left="+myleft+",resizable=yes");
}
}
window.onload=openDoc;