alert寫在哪里呢?這樣子寫顯示不出對話框來
<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>window對象</title>
<script type="text/javascript">
function openwin()
{
? ? window.open("http://idcbgp.cn","_blank","width=600px,height=400px");
? ? alert("歡迎來到慕課學習JS");
}
</script>
</head>
<body>
<form>
<input type="button" value="點擊我,打開新窗口"? onclick="openwin()"/>
</form>
</body>
</html>
2019-07-26
你不能定義已有函數(shù)吧,不能定義open()
2019-07-21
怎么沒了,看看你完整代碼
2019-07-21
alert("歡迎來到慕課學習JS");這句話寫在window.open()的前邊