<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<title>Guess</title>
<script type="text/javascript">
//生成一个1到100之间的随机数
var one=randomNumber();
alert(one);
function guess(){
//使用prompt让用户输入数字并且比较
var two=prompt("请输入1~100之间的文字!","0");
if(isNaN(+two)){
//输入了无效数字,提示,并重复执行2步
alert("请输入有效的数字");
guess();
}
else if(two>one){