1 回答

TA貢獻(xiàn)105條經(jīng)驗(yàn) 獲得超21個(gè)贊
幫你改了其中幾個(gè)錯(cuò)誤,有幾個(gè)地方語法寫錯(cuò)了
<!DOCTYPE html>
<html>
<head>
<title> new document </title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
?<script type="text/javascript"> ?
function openWindow() {
var open = confirm("是否打開新建網(wǎng)頁窗口")// 新窗口打開時(shí)彈出確認(rèn)框,是否打開
if (open == true) {
var url = prompt("請(qǐng)?zhí)顚懘_認(rèn)打開的網(wǎng)頁http://www.imoooc.com");// 通過輸入對(duì)話框,確定打開的網(wǎng)址,默認(rèn)為 http://idcbgp.cn/
if (open != null) {
window.open(url, '_blank', 'width=400,height=500,menubar=no,toolbar=no')//打開的窗口要求,寬400像素,高500像素,無菜單欄、無工具欄。
}
else { alert("再見!") }
}
else { alert("再見!") }
}
</script>
</head>
<body>
<input type="button" value="新窗口打開網(wǎng)站" onclick="openWindow()" />
</body>
</html>
添加回答
舉報(bào)