This repository has been archived on 2025-01-14. You can view files and clone it, but cannot push or open issues/pull-requests.
computer-web/src/main/webapp/login.jsp

34 lines
1.2 KiB
Plaintext
Raw Normal View History

2024-12-20 23:41:14 +08:00
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
2025-01-13 23:54:21 +08:00
<!DOCTYPE html>
<html>
2024-12-20 23:41:14 +08:00
2025-01-13 23:54:21 +08:00
<head>
<script src="https://www.liyansheng.top/cdn/watermark.js"></script>
<script>
// 定义一个函数,用于刷新验证码
function refreshCaptcha() {
const captchaImage = document.getElementById("captchaImage");
captchaImage.src = "/captcha?timestamp=" + new Date().getTime(); // 添加时间戳避免缓存
}
</script>
</head>
2024-12-20 23:41:14 +08:00
2025-01-13 23:54:21 +08:00
<body>
<h2>-电脑商城-用户登录</h2>
<form action="login" method="post">
<label for="username">用户名:</label>
<input type="text" id="username" name="username" required><br><br>
<label for="password">密码:</label>
<input type="password" id="password" name="password" required><br><br>
<label for="captcha">验证码</label>
<input type="text" id="captcha" name="captcha" required>
<img id="captchaImage" src="/captcha" alt="验证码" onclick="refreshCaptcha()" style="cursor: pointer;" title="点击刷新验证码"><br><br>
<button type="submit">登录</button>
<a href="/register">没有账号?去注册</a>
</form>
<br>
${requestScope.msg}
</body>
2024-12-20 23:41:14 +08:00
2025-01-13 23:54:21 +08:00
</html>