为什么在我的Vscode里不能实现?在这个网页上能实现?
<!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 myM=confirm("是否打开网址?");
if(myM==true)
{ var lr=prompt("通过输入对话框,确定打开的网址。","http://www.imooc.com/");
if(lr!=null)
{ window.open("lr",'width=400,height=500',"_blank");
}
}
}
</script>
</head>
<body>
<input type="button" value="新窗口打开网站" onclick="openWindow()" />
</body>
</html>