<html>
<head>
<meta charset="utf-8">
<title>new document</title>
<script type="text/javascript">
function openWindow() {
var isOpen = comfirm("是否打开网页?");
if(isOpen==true){
var url;
url = prompt("请确认:","http://www.imooc.com/");
}
else {
document("thx,886!");
}
window.open("http://www.imooc.com/",'_black','width=400,height=500');
}
openWindow();
</script>
</head>
<body>
<input type="button" value="新窗口打开网站" onclick="openWindow()" />
</body>
</html>
_blank 而且逻辑有点问题
confirm