============================================================================
window对象的三种窗口.html
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title></title>
</head>
<script type="text/javascript">
function show1()
{
window.alert("我今年18岁!");
}
function show2()
{
if(window.confirm("你是男生吗?"))
{
window.alert("要多运动");
}
else
{
window.alert("要多化妆!");
}
}
function show3()
{
if (parseInt(window.prompt("你的年龄:","18"))>18)
{
window.alert("你是成年人!");
}
else
{
window.alert("你还小!");
}
}
</script>
<body>
<input type="button" value="窗口1" οnclick="show1()" />
<input type="button" value="窗口2" οnclick="show2()"/>
<input type="button" value="窗口3" οnclick="show3()"/>
</body>
</html>