我這個代碼哪里有問題,大家?guī)兔匆幌?/h1>
<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>window.open</title>
<script type="text/javascript">
? function Wopen(){
? ? ? window.open('idcbgp.cn','_blank','height=600,width=400,top=100,left=0' );
? ? ? ??
? }?
</script>
</head>
<body>
? ? <input name="button" type="button" onClick="Wopen()" value="點擊我,打開新窗口!" / >
</body>
</html>
<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>window.open</title>
<script type="text/javascript">
? function Wopen(){
? ? ? window.open('idcbgp.cn','_blank','height=600,width=400,top=100,left=0' );
? ? ? ??
? }?
</script>
</head>
<body>
? ? <input name="button" type="button" onClick="Wopen()" value="點擊我,打開新窗口!" / >
</body>
</html>
2018-02-03
?地址少些了“http://”,?另外<input name="button" type="button" onClick="Wopen()" value="點擊我,打開新窗口!" / >,input不需要關(guān)閉標(biāo)簽,應(yīng)該刪除掉“/”