為什么我打不開,我點擊按鈕打不開啊,沒有任何反應
<!DOCTYPE html>
<html>
?<head>
? <title> new document </title>?
? <meta http-equiv="Content-Type" content="text/html; charset=gbk"/>??
? <script type="text/javascript">?
? function open window(){
?????? var a=confirm("是否打開該網(wǎng)站?");
?????? if(a=true){
?????????? var u=prompt(" http://idcbgp.cn/");
?????????? if(u!=null)
???????? { window open('u','width=400','height=500','menubar=no','toolbar=no')
?????? }
?????? }
? else{
????? return null;
? }
? }
? </script>
?</head>
?<body>
?? <input type="button" value="新窗口打開網(wǎng)站" onclick="openWindow()" />
?</body>
</html>
2019-11-25
? ? function openWindow(){
? ? ? ? var arr=confirm("是否打開");
? ? ? ? if(arr==true){
? ? ? ? ?var ao=prompt("請輸入網(wǎng)址");
? ? ? ? ?if(ao=='http://idcbgp.cn/'){
? ? ? ? ? ? ?window.open('http://idcbgp.cn/','width=400px',"height=500px",'menubar=no',"toolbar=no");
? ? ? ? ?}
? ? ? ? }
? ? }
? ? openWindow();
大概就這樣子