<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>无标题文档</title>
<script type="text/javascript">
function openWindow(){
var open=confirm("是否打开新的页面");
if(open==true){
var as=prompt("请输入您想打开网页的网址","http://www.baidu.com");
if(as!=null){
window.open('as','_black','width=700px height=500px');
}
else{
alert("网址不能为空");
}
}
else{
alert("确认不打开吗!");
}
}
</script>
</head>
<body>
<input name="button" type="button" value="点击打开新的页面"
onclick="openWindow()" />
</body>
</html>
sanlelele
blovetu
不偏不易
相关分类