沒有彈窗,也打不開新的窗口,請問問題出現在哪兒?
<!DOCTYPE?HTML>
<html>
<head>
<meta?http-equiv="Content-Type"?content="text/html;?charset=utf-8">
<title>window對象</title>
<script?type="text/javascript">
function?new(){
????alert("歡迎來到慕課網");
????window.open('http://www.xianlaiwan.cn','_blank','width=600','height=400');
}
</script>
</head>
<body>
<form>
<input?type="button"?value="點擊我,打開新窗口"?onclick="new()"?/>
</form>
</body>
</html>
2017-08-08
new 是一個關鍵字,不能用作函數名