<!DOCTYPE html>
<html>
<head>
<title>编程练习</title>
<meta http-equiv='Content-Type' content='text/html;charset=gbk'/>
<script type='text/javascript'>
function openWindow()
{var open=confirm('确定要打开一个外部网站么?');
if (open==true)
{var second=prompt('请确认网址是否正确:','http://cn.bing.com');
if (second!=null)
{window.open(open,'_blank','width=500px,height=300px');
else
{alert('I still like you!');}}
else
{alert('I do not hate you!');}}
}
openWindow()
</script>
</head>
<body>
<input type='button' value='点我点我点我' onclick='openWindow()' />
</body>
</html>