function openWindon(){ if(confirm("确定打开新窗口吗?")){ var url = prompt("请输入一个网址","http://www.imooc.com/"); window.open( url,"_blank","toolbar=no, menubar=no, scrollbars=yes, width=600, height=400"); }我为什么打不开窗口?
这个和我那个有什么区别吗? status=yes?什么意思?
<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="content-type" content="text/html"; charset="utf-8" />
<title></title>
<script type="text/javascript">
function openWindow()
{
if (confirm("确定打开新窗口吗?"))
{
var url = prompt("请输入一个网址", "http://www.imooc.com/");
window.open(url, "_blank", "toolbar=no, menubar=no, scrollbars=yes, width=600,status=yes; height=400");
}
}
</script>
</head>
<body>
<input type="button" value="click me" onclick="openWindow()" />
</body>
</html>