請(qǐng)問(wèn)為何沒(méi)有彈窗,也打不開(kāi)網(wǎng)頁(yè)
<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>window對(duì)象</title>
<script type="text/javascript">
function open(){
?alert("歡迎來(lái)到慕課網(wǎng)");
? ? window.open('http://idcbgp.cn/','_blank','width=600, ,height=800');
}
</script>
</head>
<body>
<form>
<input type="button" value="點(diǎn)擊我,打開(kāi)新窗口" onclick="open()"/>
</form>
</body>
</html>
2017-09-15
第一:在width和height中間有兩個(gè)逗號(hào);
第二:open或許是關(guān)鍵字之類的,你換個(gè)方法名就可以。