<!DOCTYPE html>
<html>
?<head>
?<meta http-equiv="Content-Type" content="text/html; charset=utf8" />
? <title> new document </title> ?
? <meta http-equiv="Content-Type" content="text/html; charset=gbk"/> ??
? <script type="text/javascript"> ?
function openwindow(){
? ? var wangzhi=prompt("請輸入網址,然后點擊確定按鈕");
? ? var queren=confirm("你要打開"+wangzhi+"這個網址嗎");
? ? if(queren==true)
? ? {
? ? window.open("http://"+wangzhi+"/","_blank","width=400,height=500");
}
}
</script>?
?</head>?
?<body>?
?<form>
?<input type="button" value="打開新窗口" onclick="openwindow()" />?
?</form>
?</body>
</html>