求助。請問怎么改輸入框打開的網(wǎng)站
<html>
<head>
?<title> new document </title> ?
?<meta http-equiv="Content-Type" content="text/html; charset=gbk"/> ?
?<script type="text/javascript"> ?
?function openWindow(){
? ?var ssz=confirm("是否打開網(wǎng)站")
? ?if (ssz==true){
? ?var qwe=prompt("請輸入網(wǎng)站地址","http://idcbgp.cn"); ? ?
? ?if (qwe!=null){
? ?window.open('http://idcbgp.cn','_blank','width=500,height=400,menubar=on,toolbar=on'); ? ?
? ?}
? ?}
? ?}
?</script>
</head>
<body>
?<input type="button" value="新窗口打開網(wǎng)站" onclick="openWindow()" />
</body>
</html>
請問怎么寫按照輸入框的地址打開網(wǎng)站呢?
例如在輸入框輸入打開百度地址 ?那就打開百度 ?而不是全部都打開慕課網(wǎng)
2015-07-09