<!DOCTYPE html>
<html>
<head>
<title>综合练习</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<script type="text/javascript">
function openWindow() {
var pages=confirm("是否打开新窗口?");
if(pages==true) {
var url=prompt("通过输入对话框,打开特定网页","www.imooc.com");
if(url!=null) {
window.open(url,"_blank",'width=600;height=300');
}
else {
alert("再见");
}
}
else {
alert("再见");
}
}
</script>
</head>
<body>
<input type="button" onclick="openWindow()" value="新窗口打开"/>
</body>
</html>
weibo_一千年前的往事_0
放弃0
badbomb
相关分类