請(qǐng)問怎么改呢 不會(huì)
<!doctype html>
<html>
<head>
<meta http-equiv="Content-Type"content="text/html;charset=gbk">
<title>new document</title>
<script type="text/javascript">
function openWindow()
{
var open=confirm("確認(rèn)新建窗口打開網(wǎng)站嗎?");
if(open==true)
//新窗口打開時(shí)彈出對(duì)話框,是否打開
{
var url=prompt("通過輸入對(duì)話框,確定打開的網(wǎng)址","http://baidu.com");
if(url!=null)
//通過輸入對(duì)話框,確定打開的網(wǎng)址,默認(rèn)為http://baidu.com、
{
window.open(url,"_blank",'width=400px,height=500px,menubar=no,toolbar=no');
}
//打開的窗口要求
else{alert("再見!");
}
else
{
alert("再見!");
}
}
</head>
<body>
<input type="button"value="新窗口打開網(wǎng)站"onClick="openWindow()"/>
</body>
</html>
2015-06-03