為什么窗口不顯示?
<!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 mychar=confirm("是否打開新窗口?");
? ? ? ? }
? ? ? ? if(mychar==true){
? ? ? ?window.open('http://idcbgp.cn/','_blank','width=400,height=500,menubar=no,toolbar=no')
? ? ? ? }
? </script>?
?</head>?
?<body>?
?<input type="button" value="新窗口打開網(wǎng)站" onclick="openWindow()" />?
?</body>
</html>
2015-12-28
var mychar=confirm("是否打開新窗口?");后面的}位置錯(cuò)了,要挪到最后面
http://idcbgp.cn/用了中文的冒號(hào)