請問這是哪里錯了,打開是http://idcbgp.cn/code/kxf1這個網(wǎng)址,不是目標網(wǎng)址
<!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 kxf = confirm("是否打開新窗口");
????? if(kxf==true){
????????? var kxf1=prompt("彈出",'http://idcbgp.cn/');
????????? window.open("kxf1","_blank","width=400,height=500");
????? }else if(kxf==false){
????????? alert("再見呦");
????? }
? }
??? // 通過輸入對話框,確定打開的網(wǎng)址,默認為 http://idcbgp.cn/
??? //打開的窗口要求,寬400像素,高500像素,無菜單欄、無工具欄。
? </script>
?</head>
?<body>
?? <input type="button" value="新窗口打開網(wǎng)站" onclick="openWindow()" />
?</body>
</html>
2019-06-11
http://idcbgp.cn/? 目標地址。
2019-06-05
原文里面的網(wǎng)址那個冒號是中文輸入法的冒號,把他換掉就行了
2019-05-30
window.open中還是要填寫應(yīng)該彈出的網(wǎng)址