<!DOCTYPE html><html>?<head>? <title> new document </title>? ? <meta http-equiv="Content-Type" content="text/html; charset=utf8"/>?? ? <script type="text/javascript">? ??? ??? function openWindow(){??? var poker=confirm("you sure wanna open the website?");??? if(poker=true)??? {dream();}??? else??? {document.write("good boy,you better sheep away!");}??? ??? function dream(){??? var heart=prompt("put in the website!");??? if(heart!=null)??? {window.open("heart", "_black", "width=400, height=500, menubar=no, toolbar=no");}??? else??? {window.open("http://idcbgp.cn/", "_black", "width=400, height=500, menubar=no, toolbar=no");}??? }??? ??? ? </script> ?</head> ?<body> ?? <input type="button" value="新窗口打開網(wǎng)站" onclick="openWindow()" /> ?</body></html>
這一段代碼為什么不能運(yùn)行,謝謝大神幫助!
Mark_孟8
2016-07-10 22:39:02