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