window.open()本地不能成功使用
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>學(xué)習(xí)JS測(cè)試</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="測(cè)試">
</body>
</html>
2016-07-21
window.open函數(shù)的三個(gè)參數(shù)之間要使用英文逗號(hào)隔開
2016-07-21
window.open('http:idcbgp.cn' '_blank' 'width=600px,height=400px,top=100px,left=0')
這里寫錯(cuò)了,沒用逗號(hào)隔開。。
window.open("http://idcbgp.cn","_blank()","width=600px,height=400px,top=100px,left=0");
2016-07-21
??function wopen(){
? ? ? ? ? window.open('http://idcbgp.cn' ,'_blank' ,'width=600px,height=400px,top=100px,left=0')
? ? ? ? ?}
wopen(); //最后還要調(diào)用一下,然后就可以了,這是正確版本,首先你網(wǎng)址少兩斜杠,其次逗號(hào)沒分開,最后再調(diào)用一下函數(shù),就可以了
2016-07-21
?function Wopen(){
? window.open('http://idcbgp.cn','_blank','width=600,height=400,top=100,left=0') ? ?
? }?
中間加逗號(hào),望采納
2016-07-21
樓上說得對(duì),還有網(wǎng)址打錯(cuò)了,應(yīng)該是http://idcbgp.cn吧