來找茬 找錯誤
<!DOCTYPE html>
<html>
?<head>
? <title> new document </title>?
? <meta http-equiv="Content-Type" content="text/html; charset=gbk"/>??
? <script type="text/javascript">???
? function dow()
? {
???
?? var new=confirm("是否打開新窗口?");
??? if(new==true)
??? {
??????? var su=prompt("輸入網(wǎng)址","http://idcbgp.cn/");
???? if(su!=null)
???? {
???? window.open("http://idcbgp.cn/",'width=400,height=500,menubar=no,toolar=no');
???? }
??? else
??? {
??????? alert("88!");
???????
??????? }
??? }
??????? else
??????? {
??????? alert("再見");
??????? }
?????????
? }??
? </script>
?</head>
?<body>
????? <input type="button" value="新窗口打開網(wǎng)站" onclick="dow()" />
?</body>
?
</html>
2016-05-26
var new=confirm("是否打開新窗口?");這句話有錯誤
不能用關(guān)鍵字當變量名字。