<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title></title>
<style type="text/css">
body{
background-color: #FFA1A1;
}
#gname{
width: 600px;
height: 600px;
margin: auto;
margin-top: 60px;
background-color: #00FFFF;
line-height: 600px;
}
#start{
width: 100px;
height: 60px;
margin: auto;
line-height: 60px;
margin-top: -230px;
}
h2{color: white;}
a{text-decoration: none}
</style>
</head>
<body>
<div id="gname">
<h1 align="center">游戏结束</h1>
<div id="start">
<a href="数字游戏.html"><h2 align="center">再来一局</h2></a>
</div>
</div>
<script type="text/javascript">
var number2=Math.ceil(Math.random()*10);
while(true){
var number1=prompt ('猜一猜是0-10中的那个数字数字')
if(number1>number2){
alert('大了呦');
}
else if(number1<number2){
alert('小了呦');
}else{
alert("猜的真准,你是先知吗");
break;
}
}
</script>
</body>
</html>
01-12
1074