<!doctype html>
<html>
<head>
<title></title>
<meta http-equiv="content-type" content="text/html;charset=UTF-8"/>
<style type="text/css"></style>
<script type="text/javascript">
var i=prompt('请输入你猜的数字,不可为零');
while(i!=5){
if(i<5 && i>0){
alert("小了");
}else if(i>5){
alert("大了");
}else if(i==null){
alert("请输入!");
}else if(i==undefined){
alert("不可为空!");
}else if(i==0){
alert("不可为零");
}
i=prompt("请输入你猜的数字,不可为零");
}
if(i==5){
alert("猜对了");
}
</script>
</head>
<body></body>
</html>
慕少9107832
橋本奈奈未
相关分类