<!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 newpage=confirm("是否打开页面?");
if(newpage==true)
{
var open=prompt("输入你想要打开的网页","http://www.imooc.com/");
if(open="慕课网")
{
window.open("http://www.imooc.com/","width:400","height:500","toolbar:no","menubar:no")
}
}
</script>
</head>
<body>
<input type="button" value="新窗口打开网站" onclick="openWindow()" />
</body>
</html>
function openWindow(){
if(confirm("是否打开页面?"))
{
var open=prompt("输入你想要打开的网页");
if(open=="慕课网")
{
window.open("http://www.imooc.com/","width:400","height:500","toolbar:no","menubar:no")
}
}