新增业务
![](https://i-blog.csdnimg.cn/blog_migrate/daabde1e421cdfeed4a5682d766e68c6.png)
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
<title>Title</title>
<script type="text/javascript" src="js/jquery-3.6.0.min.js"></script>
</head>
<body>
<h1>新增业务</h1>
<form action="addbusiness">
<table >
<tr>
<td>业务类型:</td>
<td><select id="business" name="business">
<option value="信用卡">信用卡</option>
<option value="现金业务">现金业务</option>
<option value="转账业务">转账业务</option>
</select></td>
</tr>
<tr>
<td>排队号:</td>
<td><input type="text" name="num"><span style="color: red">必填</span></td>
</tr>
<tr>
<td>备注信息:</td>
<td><textarea rows="3" cols="30" name="str"></textarea></td>
</tr>
<tr>
<td>
<input type="submit" value="确认添加" id="btn">
</td>
</tr>
</table>
</form>
<script>
$(function() {
$("#btn").click(function() {
$("font").html("");
var bType = $("select").val();
var num = $("[name=num]").val();
var str = $("[name=str]").val();
if (num == null || num == "") {
$("[name=num]").after("<font color='red' >必填</font>")
}
})
})
</script>
</body>
</html>