請問我這段代碼哪里錯了?求助??!
<!DOCTYPE html>
<html>
<head>
? <title> new document </title> ?
? <meta http-equiv="Content-Type" content="text/html; charset=gbk"/> ??
?<script type="text/javascript">
? function openwindow(){
var open=confirm("是否打開新的網頁?");
if(open==ture){
var url=prompt("請輸入要打開網頁的網址","www.baidu.com");
if(url==ture){
window.open(url,"_blank",'width=400px,height=500px,menubar=no,toolbar=no');
}
else {
alert("再見!")
}
}
else {
alert("再見!")
}
}
?
?</script>
?
?</head>?
?<body>?
<input type="button" name="buttom" value="點擊我,打開新的網頁" ?onclick="openwindow()">
?</body>
</html>
2017-04-11
true,是true不是ture
2017-04-11
input輸入name 名"buttom"拼寫錯了