请教淘宝的网址为什么打不开? 逻辑有错误吗?
<!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 flag;
flag= confirm("是否打开新网站");
if(flag=true){
var myUrl= prompt("请输入要打开的网址","");
if(null!=myUrl){
window.open('http://'+myUrl,'_blank','width=400,height=500');
}
else
window.open('http://www.taobao.com','_blank','width=400,height=500');
}
}
</script>
</head>
<body>
<input type="button" value="新窗口打开网站" onclick="openWindow()" />
</body>
</html>