在html页面添加input实现复选框代码后出现“Whitelabel Error Page”错误

本文记录了一个关于HTML页面中复选框代码的低级错误——忘记闭合input标签,导致出现“WhitelabelErrorPage”错误。提醒开发者在编写HTML代码时注意标签的正确闭合。

在html页面添加input实现复选框代码后出现“Whitelabel Error Page”错误,如下图:

百度了好久,才发现是input标签没有闭合......

 

记录一下这低级的错误!

<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> <!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title>泰信应用商城管理系统 - 登录</title> <link rel="stylesheet" type="text/css" href="css/style.css"> <style> /* 新增登录页面专用样式 */ body { background: linear-gradient(135deg, #0066cc, #004080); height: 100vh; display: flex; justify-content: center; align-items: center; font-family: 'Arial', sans-serif; margin: 0; } .login-container { width: 380px; padding: 40px; background-color: white; border-radius: 10px; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2); text-align: center; animation: fadeIn 0.5s ease-in-out; } @keyframes fadeIn { from { opacity: 0; transform: translateY(-20px); } to { opacity: 1; transform: translateY(0); } } .login-container h1 { color: #0066cc; margin-bottom: 30px; font-size: 28px; font-weight: 600; } .form-group { margin-bottom: 20px; text-align: left; } .form-group label { display: block; margin-bottom: 8px; font-weight: 500; color: #555; } .form-group input { width: 100%; padding: 12px 15px; box-sizing: border-box; border: 1px solid #ddd; border-radius: 6px; font-size: 16px; transition: border-color 0.3s; } .form-group input:focus { border-color: #0066cc; outline: none; box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.1); } button[type="submit"] { width: 100%; background-color: #0066cc; color: white; padding: 14px; border: none; border-radius: 6px; cursor: pointer; font-size: 16px; font-weight: 500; transition: background-color 0.3s; margin-top: 10px; } button[type="submit"]:hover { background-color: #0052a3; } .error { color: #e74c3c; margin-top: 15px; padding: 10px; background-color: #fdecea; border-radius: 6px; font-size: 14px; } .logo { width: 80px; height: 80px; margin-bottom: 20px; } .footer { margin-top: 30px; color: #777; font-size: 13px; } </style> </head> <body> <div class="login-container"> <!-- 可以添加logo图片 --> <!-- <img src="images/logo.png" class="logo" alt="泰信应用商城"> --> <h1>泰信应用商城管理系统</h1> <form action="LoginServlet" method="post"> <div class="form-group"> <label for="username">用户名</label> <input type="text" id="username" name="username" placeholder="请输入用户名" required> </div> <div class="form-group"> <label for="password">密码</label> <input type="password" id="password" name="password" placeholder="请输入密码" required> </div> <button type="submit">登 录</button> <% if(request.getAttribute("error") != null) { %> <p class="error"><%= request.getAttribute("error") %></p> <% } %> </form> <div class="footer"> © 2023 泰信应用商城管理系统 - 版权所有 </div> </div> </body> </html> 帮我美化登录页面
09-17
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

路痴不脸盲

你的鼓励将是我创作的最大动力!

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值