運(yùn)行不出來,哪里有錯(cuò)
<!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?message=confirm("是否打開網(wǎng)頁?"); ????????if(message==true){ ????//?新窗口打開時(shí)彈出確認(rèn)框,是否打開 ????????????var?passage; ????????????passage=prompt("請(qǐng)輸入網(wǎng)址","http://idcbgp.cn"); ????//?通過輸入對(duì)話框,確定打開的網(wǎng)址,默認(rèn)為?http://idcbgp.cn/ ????????????if(passage!=null){ ????????????????window.open(passage,'_blank','width=400,heigth=500,menubar=no,toolbar=no'); ????????????} ????????????else ????????????{alert("error");} ????//打開的窗口要求,寬400像素,高500像素,無菜單欄、無工具欄。} ????else ????{alert("error");} ????} ???? ??</script>? ?</head>? ?<body>? ??<input?type="button"?value="新窗口打開網(wǎng)站"?onclick="openWindow()"?/>? ?</body> </html>
求大神看看哪里出錯(cuò)了,運(yùn)行沒有反應(yīng),怎么回事啊
2015-09-26
還是運(yùn)行部出來啊。
2015-09-10
這里分號(hào)錯(cuò)了,敲成中文的了,改成英文的吧。
這里冒號(hào)也被敲成了中文,改英文。
這里的}被注釋掉,其實(shí)不用注釋的
修改后的代碼
2015-09-10
仔細(xì)檢查一下括號(hào)是否匹配,還有明顯用了中文分號(hào)啊。