<!DOCTYPE html>
<html>
<head>
<title> new document </title>
<meta http-equiv="Content-Type" content="text/html; charset=gbk"/>
<script type="text/javascript">
function openWebsite()
{
var web;
var urlw=confirm("确认打开网址吗?");
if(urlw==true){
web=prompt("请输入网址",'http://www.imooc.com/');
window.open(web,width=400,height=500,menubar=no,toolbar=no);
}
else
{
alert("谢谢使用");
}
}
</script>
</head>
<body>
<input type="button" onClick="openwebsite()" value="新窗口打开网站"/>
</body>
</html>
知道了