為什么點擊按鈕沒反應呢?求大神指導
<!DOCTYPE html>
<html>
?<head>
? <title> new document </title>??
? <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>? ?
? <script type="text/javascript">??
? ??
? ? // 新窗口打開時彈出確認框,是否打開
? ? var URL = "http://idcbgp.cn/"
? ? function openWinow(){
? ? var aa = confirm("是否要跳轉到其他頁面")
? ? if(aa==true){
? ? ? ? prompt("請輸入需要打開的網(wǎng)址",URL);
? ? ? ? window.open(
? ? ? ? ? ?'URL' '_blank','height=500,width=400,menubar=no,toolbar=no')
? ? }
}
? ??
? ??
? ??
? ??
? </script>?
?</head>?
?<body>?
? <input type="button" value="新窗口打開網(wǎng)站" onclick="openWindow()" />?
?</body>
</html>
2018-06-20
<!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 abs=confirm("是否打開窗口");
if(abs)
??? window.open(' http://idcbgp.cn/','_blank','width=400px,top=500px,left=0,menubar=no,toolbar=no')
??? //打開的窗口要求,寬400像素,高500像素,無菜單欄、無工具欄。
?? }
?? ?
? </script>
?</head>
?<body>
?? ?? <input type="button" value="新窗口打開網(wǎng)站" onclick="openWindow()" />
?</body>
</html>
2018-06-19
<!DOCTYPE html>
<html>
?<head>
? <title> new document </title> ?
? <meta http-equiv="Content-Type" content="text/html; charset=gbk"/>? ?
? <script type="text/javascript"> ?
? ?
??? // 新窗口打開時彈出確認框,是否打開
?var URL = "http://idcbgp.cn/"
??? function openWindow(){
??? var aa = confirm("是否要跳轉到其他頁面")
??? if(aa==true){
??????? prompt("請輸入需要打開的網(wǎng)址",URL);
??????? window.open(
????????? URL ,'_blank','height=500,width=400,menubar=no,toolbar=no')
??? }
?? ?
??? }
??? // 新窗口打開時彈出確認框,是否打開
??? // 通過輸入對話框,確定打開的網(wǎng)址,默認為 http://idcbgp.cn/
??? //打開的窗口要求,寬400像素,高500像素,無菜單欄、無工具欄。
?? ?
?? ?
? </script>
?</head>
?<body>
?? ?? <input type="button" value="新窗口打開網(wǎng)站" onclick="openWindow()" />
?</body>
</html>