<!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 conf = confirm("是否打開新的窗口?");? ? ? ? if(conf == true){? ? ? ? ? ? ?? ? ? ? ? ? var hhh = prompt("請輸入你想去的網址","http://www.baidu.com");? ? ? ? ? ?? ? ? ? ? ??? ? ? ? ? ? window.open(hhh,"_blank","width = 400,height = 500,menubar = no,toolbar = no");? ? ? ? ? ??? ? ? ? ? ??? ? ? ? }? ? ? ? else? ? ? ? {? ? ? ? ? ? alert("你沒有任何想去的地方嗎?");? ? ? ? ? ? openWindow();? ? ? ? }? ? }? ??? </script>??</head>??<body>? ?<input type="button" value="新窗口打開網站" onclick="openWindow()" />??</body></html>
為什么是打開的http://www.xianlaiwan.cn/code/www.xianlaiwan.cn,問題出在哪
淡薄且茍
2017-02-06 17:12:10