為什么會一直彈出新窗口?
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>window對象</title>
<script type="text/javascript">
function alert(){ ??
? ? alert("歡迎來到慕課網");
? ? window.open('http://www.xianlaiwan.cn','_blank','width=400px','hight=400px');
?
}
</script>
</head>
<body>
<form>
<input type="button" value="點擊我,打開新窗口" onclick=alert() />
</form>
</body>
</html>
2019-09-02
應該就是網站本身出的問題? 在其他地方是能正常運行的 或者換個域名也能正常打開 和函數名并沒有關系?
2019-05-06
2019-01-03
<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>window對象</title>
<script type="text/javascript">
alert("歡迎來到慕課網");
function openW(){
? ? window.open("http://www.xianlaiwan.cn","_blank","height=600px,width=400px");
}
</script>
</head>
<body>
<form>
<input type="button" value="點擊我,打開新窗口" onclick="openW()" />
</form>
</body>
</html>
2018-12-20
你這函數名不要起alert(),alert本來就不是彈框的內置函數。。你自己怎么又定義一個呢。。函數起名的規則建議重新復習一下。。。