各位大神,幫我看看代碼哪里出錯了?宇宙級大問題?。?!
<!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 a;
??????? a=confirm("sss");
??????? if(a == true)
??????? {
??????????? window.open('http://idcbgp.cn','web_imooc','width=400px,height=500px,menubar=no,toolbar=no');
??????? }
??????? else
??????? {
??????????? document.write("nothing");
??????? }
?}
?? ?
??? // 新窗口打開時彈出確認框,是否打開
??? // 通過輸入對話框,確定打開的網址,默認為 http://idcbgp.cn/
??? //打開的窗口要求,寬400像素,高500像素,無菜單欄、無工具欄。
?? ?
?? ?
? </script>
?</head>
?<body>
?? ?? <input type="button" value="新窗口打開網站" onclick="openWindow()" />
?</body>
</html>
2015-09-04
? ? function openWindow();
右邊多了一個分號。。。以后自己細心一點吧