不知道為什么點(diǎn)擊了彈出窗口的“好”,但是沒有做我的window.open代碼
<!DOCTYPE html>
<html>
?<head>
? <title> new document </title> ?
? <meta http-equiv="Content-Type" content="text/html; charset=gbk"/> ??
? <script type="text/javascript"> ?
? ??
? ? // 新窗口打開時(shí)彈出確認(rèn)框,是否打開
? ?
? ? function openWindow(){
? ? ? ? var isOpen = confirm("是否打開 http://idcbgp.cn/");
? ? ? ? if(isOpen == ture){
? ? ? ? ? ? window.open('http://idcbgp.cn','_blank','width=400,height=500,menubar=no,toolbar=no');
? ? ? ? }else{
? ? ? ? ? ??
? ? ? ? }
? ? }
? ? // 通過輸入對(duì)話框,確定打開的網(wǎng)址,默認(rèn)為 http://idcbgp.cn/
? ? //打開的窗口要求,寬400像素,高500像素,無菜單欄、無工具欄。
? ??
? ??
? </script>?
?</head>?
?<body>?
?<input type="button" value="新窗口打開網(wǎng)站" onclick="openWindow()" />?
?</body>
</html>
2022-03-24
你看看判斷狀態(tài),改變狀態(tài)的地方是不是有什么問題嘞。backgroundColor是明確指出是背景色,background是指背景
2018-09-29
還有那個(gè)網(wǎng)址您最好再確認(rèn)一下,是不是對(duì)的,因?yàn)槲腋杏X你那段冒號(hào)的空格有一點(diǎn)大,可能是網(wǎng)址的原因。
2018-09-29
你好,要么把else給刪除掉,要么把else后面寫完整。