為什么不能打開新窗口
<!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([http://idcbgp.cn],[_blank],[width:600px;height:400px;top:100px;left:0;]) ?
? }?
</script>
</head>
<body>
? ? <input name="button" type="button" onClick="Wopen()" value="點(diǎn)擊我,打開新窗口!" / >
</body>
</html>
2016-05-18
window.open([http://idcbgp.cn],[_blank],[width:600px;height:400px;top:100px;left:0;])?
不用【】,用''
2016-05-01
<!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('http://idcbgp.cn','_blank','width:600px,height:400px,top:100px,left:0;') ?
? } ;
</script>
</head>
<body>
? ? <input name="button" type="button" onClick="Wopen()" value="點(diǎn)擊我,打開新窗口!" / >
</body>
</html>
2016-04-28
<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>window.open</title>
?<script type="text/javascript"> ?
?? ?function openWindon(){
?? ??? ?if(confirm("確定打開新窗口嗎?")){
?? ??? ??? ?var url = prompt("請輸入一個(gè)網(wǎng)址","http://idcbgp.cn/"); ?
?? ??? ??? ?window.open( url,"_blank","toolbar=no, menubar=no, scrollbars=yes,? width=400, height=400");
?? ??? ?}
?? ?} ?
?</script>
</head>
<body>
? <input type="button" value="新窗口打開網(wǎng)站" onclick="openWindon()" />
</body>
</html>
2016-04-28
<!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("http://idcbgp.cn","_blank","width:600px;height:400px;top:100px;left:0;") ?
? }?
</script>
</head>
<body>
? ? <input name="button" type="button" onClick="Wopen()" value="點(diǎn)擊我,打開新窗口!" / >
</body>
</html>
用引號括起來