我为什么打不开设置的窗口?
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"); }我为什么打不开窗口?
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"); }我为什么打不开窗口?
2016-12-23
<!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>
举报