<!DOCTYPE html><html>?<head>? <title> new document </title> ?? <meta http-equiv="Content-Type" content="text/html; charset=gbk"/>? ?? <script type="text/javascript"> ?? function text()? {????? var open;????? open=confirm('是否在新窗口打開網頁?');???????? if(open==true)???????? {???????????? var url=prompt('請輸入網址:',"http://www.xianlaiwan.cn/");???????????? if (url!=null)???????????? {???????????????? window.open(url,'_blank','width=400,height=500,menubar=no,toolbar=no,')???????????? }???????????? else ???????????? {???????????????? alert('再見!';);???????????? }???????? }???????? else???????? {???????????? alert{'再見!';}???????? }? }? </script> ?</head> ?<body> ?? ?? <input type="button" value="新窗口打開網站" onclick="text()" /> ?</body></html>
為什么還是打不開?
Hakumatsu
2017-05-29 17:38:02