<!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title>整数四则运算测试程序</title> </head> <body> <h1>整数四则运算测试程序</h1> <p>请选择题型和题目数量:</p> <label><input type="radio" name="type" value="add" checked>加法</label> <label><input type="radio" name="type" value="sub">减法</label> <label><input type="radio" name="type" value="mul">乘法</label> <label><input type="radio" name="type" value="div">除法</label> <br> <label>题目数量:<input type="number" name="num" value="10" min="1" max="100"></label> <br> <button id="startBtn">开始答题</button> <div id="questions"></div> <br> <button id="submitBtn">提交答案</button> <div id="score"></div> <script src="test.js"></script> </body> </html>修改该代码,让加减乘除的选择在一个按键里,让开始答题和提交答案按键在同一行
时间: 2023-07-19 10:57:19 浏览: 54
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>整数四则运算测试程序</title>
</head>
<body>
<h1>整数四则运算测试程序</h1>
<p>请选择题目类型和数量:</p>
<button id="addBtn" class="operationBtn" value="add">加法</button>
<button id="subBtn" class="operationBtn" value="sub">减法</button>
<button id="mulBtn" class="operationBtn" value="mul">乘法</button>
<button id="divBtn" class="operationBtn" value="div">除法</button>
<br>
<label>题目数量:<input type="number" name="num" value="10" min="1" max="100"></label>
<br>
<button id="startBtn">开始答题</button>
<button id="submitBtn">提交答案</button>
<br>
<div id="questions"></div>
<br>
<div id="score"></div>
<script src="test.js"></script>
</body>
</html>
相关推荐
![pdf](https://img-home.csdnimg.cn/images/20210720083512.png)
![](https://img-home.csdnimg.cn/images/20210720083646.png)
![](https://img-home.csdnimg.cn/images/20210720083646.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> <!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>Insert title here</title> one.jsp two.jsp three.jsp error.jsp </head> <body> 请输入1至100之间的整数:<input type="text" name="name"> <input type="submit" value=提交> <% String str=request.getParameter("name"); if(1<=str<=50){ %> <form action="two.jsp" method=post/> <% } else if(50<str<=100){ %> <form action="three.jsp"method=post/> <% } else{ %> <form action="error.jsp"method=post/> <% } %> </body> </html>
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)