<!DOCTYPE html>
<html>
<head>
<title> new document </title>
<meta http-equiv="Content-Type" content="text/html; charset=gbk"/>
<script type="text/javascript">
function openWindow(){
var mymessage=confirm("确定打开新窗口吗?");
if(mymessage==true)
{ prompt("请输入网址:");
window.open(prompt,'_black');
}
else
{ document.write("加油"); }
}
</script>
</head>
<body>
<form>
<input type="button" value="新窗口打开网站" onclick="openWindow()" />
</form>
</body>
</html>