為什么我的沒法彈出提示框,代碼如下.大伙幫我看看
<!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 mywindow= confirm("是否打開新窗口");
? ? ? ? if(mywindow){
? ? ? ? ? ? window.open('http://idcbgp.cn','_blank','width=400px,height=500px');
? ? ? ? ? ? else{
? ? ? ? ? ? ? ??
? ? ? ? ? ? }
? ? ? ? }
? ? }
? ??
? </script>?
?</head>?
?<body>?
?<input type="button" value="新窗口打開網(wǎng)站" onclick="openWindow()" />?
?</body>
</html>
2016-12-17
<!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 mywindow= confirm("是否打開新窗口");
? ? ? ? if(mywindow){
? ? ? ? ? ? window.open('http://idcbgp.cn','_blank','width=400px,height=500px');
}
else{
? ? ? ? ? ? ? ??
? ? ? ? ? ? }
? ? ? ??
? ? }
? ??
? </script>?
?</head>?
?<body>?
?<input type="button" value="新窗口打開網(wǎng)站" onclick="openWindow()" />?
?</body>
</html>
2016-12-17
少了一個左括號和一個右括號