You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

54 lines
1.9 KiB

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

<%--
Created by IntelliJ IDEA.
User: DELL
Date: 2026/4/28
Time: 10:49
To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
<title>证券账户录入</title>
<script type="text/javascript">
function validateForm() {
var id = document.forms[0].id.value.trim();
var userId = document.forms[0].userId.value.trim();
var balance = document.forms[0].balance.value.trim();
// 验证必填字段
if (!id || !userId || !balance) {
alert("账户ID、用户ID和余额为必填项");
return false;
}
// 验证数字格式
if (isNaN(id) || id.indexOf('.') !== -1) {
alert("账户ID必须为整数");
return false;
}
if (isNaN(userId) || userId.indexOf('.') !== -1) {
alert("用户ID必须为整数");
return false;
}
if (isNaN(balance)) {
alert("余额必须为数字!");
return false;
}
return true;
}
</script>
</head>
<body>
<h3>证券账户信息录入-组员于杉杉</h3>
<form action="submitStockAccount" method="post" onsubmit="return validateForm()">
账户ID<input name="id" type="text" placeholder="请输入整数"><br><br>
用户ID<input name="userId" type="text" placeholder="请输入整数"><br><br>
账户名:<input name="accountName" type="text" placeholder="请输入账户名"><br><br>
余额:<input name="balance" type="text" placeholder="请输入数字"><br><br>
开户时间:<input name="createTime" type="text" placeholder="格式: yyyy-MM-dd"><br><br>
<input type="submit" value="提交">
</form>
</body>
</html>