在右邊編輯器script標(biāo)簽內(nèi)補(bǔ)充代碼,彈出對(duì)話框"歡迎來到慕課網(wǎng)"。 定義一個(gè)函數(shù),實(shí)現(xiàn)打開一個(gè)網(wǎng)頁,寬為600,高為400。下面的代碼中斜體部門是否正確?
<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>window對(duì)象</title>
<script type="text/javascript">
alert("歡迎來到慕課網(wǎng));
window.open();
</script>
</head>
<body>
<form>
<input type="button" value="點(diǎn)擊我,打開新窗口"? />
</form>
</body>
</html>
2016-08-31
還有按鈕需要加上事件響應(yīng)代碼:
2016-08-31
alert("歡迎來到慕課網(wǎng)");
window.open('idcbgp.cn','_block','width=600px,height=400px');
2016-08-31
alert("歡迎來到慕課網(wǎng)");
2016-08-31
網(wǎng)字后面少了一個(gè)“ 符號(hào)。