大家帮忙看看,代码运行不出最后的效果
<!DOCTYPE html>
<html>
<head>
<title> new document </title>
<meta http-equiv="Content-Type" content="text/html; charset=gbk"/>
<script type="text/javascript">
function openWindow(){
var mymessage=confirm("是否打开");
if(mymessage==true)
{
var talk=prompt("请输入网址");
window.open('talk','width=400,height=500,menubar=no,toolbar=no');
}
else
{
window.open('http://www.imooc.com','width=400,height=500,menubar=no,toolbar=no');
}
}
</script>
</head>
<body>
<input type="button" value="新窗口打开网站" onclick="openWindow()" />
</body>
</html>