誰幫我看一下我這里哪里出錯(cuò)了,實(shí)在找不出來…
<!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 bool=confirm("是否彈出對(duì)話框?");
if(bool=true)
{ ? ?
? ? var url=prompt("輸入你想打開的網(wǎng)址:","http://idcbgp.cn/");
? ? if(url!=null)
? ? {
? ? window.open(url,'_blank','width=400,height=500,menubar=no,toolbar=no');
? ? }
}
else
{
? ? document.write("檢測(cè)不到你想打開的網(wǎng)頁");
}
?}
? </script>?
?</head>?
?<body>?
?<input type="button" value="新窗口打開網(wǎng)站" onclick="openWindow()" />?
?</body>
</html>
2016-10-14
我刷新了一下,解決了,方法可行