為什么運(yùn)行不了
<!DOCTYPE HTML>
??? <html>
<head>
??? <title>測驗(yàn)</title>
??? <meta http-equiv="Content-Type" content="text/html; charset=gbk"/>
??? <script type="text/javascript">
??????? function openWindow(){
????????? var open=confirm("確定要打開新的窗口嗎?");
??????????? if(open==true){
??????????????? var url=prompt("確定輸入的網(wǎng)址","www.baidu.com");
??????????????? if(url!=null){
??????????????????? window.open(url,"_blank",'width=400px,height=500px,menubar=no,toolbar=no');
??????????????? }else{
??????????????????? alert("再見!");
??????????????? }
??????????? }else{
??????????? alert("byebye!");
??????????? }
??????? }
?</script>
</head>
<body>
<input type="button" value="點(diǎn)擊" onclick="openWindow()"/>
</body>
</html>
2015-06-02
括號錯(cuò)了 最后的else
2015-06-02
在 alert("byebye"); 上面的括號是 中文的括號 ?你吧括號 重新打一遍就行了?else{
??????????? alert("byebye!");
??????????? } ?這括號~ ?希望能幫到你