為什么點擊確定后,不能打開網(wǎng)頁
<!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(){
var wo=confirm('是否打開網(wǎng)頁');
if(wo==ture){
? ? ? window.open('http://idcbgp.cn','_blank','width=600,height=400,top=100,left=0');}
?else?
{ window.open('http://www.baidu.com','_blank','width=600,height=400,top=100,left=0');}
? }?
</script>
</head>
<body>
? ? <input name="button" type="button" onClick="Wopen()" value="點擊我,打開新窗口!" / >
</body>
</html>
2018-11-16
第二步對話框在哪???你這么寫也太沒難度了
2018-11-15
if(wo==ture){
true打錯了。。