猜数字制作
<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
	</head>
	<body>
		<script>
			function fun() {
				alert("1-100猜数字");
				let num = Math.floor(Math.random() * 100) + 1;
				for (let i = 1; i <= 10; i++) {
					let numb = prompt("请输入:");
					if (i == 10) {
						alert("正确的数是:" + num);
					} else if (i < 10) {
						if (numb == num) {
							alert("对了");
							break;
						} else if (numb > num) {
							alert("大了");
						} else if (numb < num) {
							alert("小了");
						}
					}
				}
			}
			fun();
		</script>
	</body>
</html>





















![安卓请求服务器[根据服务器的内容来更新spinner]](https://i-blog.csdnimg.cn/direct/c91e7747a55345e3a737ddda1ca620d8.png)

