請問我的代碼哪里錯(cuò)了
<!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 kai=confirm('是否打開網(wǎng)站');
?????? if kai==true
?????? {
?????????? var dingkai=prompt("默認(rèn)網(wǎng)站為 http://yifanck.cn/",'http://yifanck.cn/');
??????????? if dingkai!=null
??????? {
??????????? window.open(dingkai,'width=400,height=500,menubar=no,toolbar=no');
??????? }
?????? }
?? ?
????? ?
??? // 新窗口打開時(shí)彈出確認(rèn)框,是否打開
???? ?
???? ?
??? // 通過輸入對話框,確定打開的網(wǎng)址,默認(rèn)為 http://yifanck.cn/
??? //打開的窗口要求,寬400像素,高500像素,無菜單欄、無工具欄。
?? ?
?? ?
? </script>
?</head>
?<body>
?? ?? <input type="button" value="新窗口打開網(wǎng)站" onclick="openWindow()" />
?</body>
</html>
2016-04-26
if語句if(){},還有就是關(guān)于什么時(shí)候用單引號什么時(shí)候用雙引號,雖然有時(shí)候沒有區(qū)別,但還是注意一下用法規(guī)范
2016-04-26
IF用法問題。。。
2016-04-26
if的用法是if(){}