打開我輸入的網(wǎng)址是http://idcbgp.cn/code/www.baidu.com這樣的 而不直接就是www.baidu.com
<!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 a=confirm("是否在新窗口打開網(wǎng)頁"); // 新窗口打開時彈出確認框,是否打開
? ? if(a==true)?
? ? {
? ? ? ? var wz=prompt("請輸入要打開的網(wǎng)址",);
? ? ? ? if(wz!=null) {
? ? ? ? ? ? window.open(wz,"_blank","width=400,height=500,menubat=0,toolbar=0");
? ? ? ? }
? ? ? ? else{
? ? ? ? ? ? window.open(" http://idcbgp.cn/","_blank","width=400,height=500,menubat=0,toolbar=0"); ??
? ? ? ? }
? ? ? ?
? ? }
? ? ?}
? </script>?
?</head>?
?<body>?
?<input type="button" value="新窗口打開網(wǎng)站" onclick="openWindow()" />?
?</body>
</html>
2018-05-01
遇到了一樣的問題,lz解決了嗎?
2017-06-01
我的錯誤? 打成中文的符號了。。。。
2017-06-01
我的也是:http://idcbgp.cn/code/http%EF%BC%9A//idcbgp.cn/
這是我的代碼
求解~~~
2017-03-29
把_blank改成_self試試
2017-03-23
你輸入:http://www.baidu.com/ ?試試?