【发布时间】:2021-11-13 13:58:08
【问题描述】:
我不明白,为什么当我添加“密码” div 时,我的 html 视图没有正确显示?使用 Thymeleaf 作为模板引擎。 HTML 文件:
<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.w3.org/1999/xhtml">
<head>
<meta charset="UTF-8">
<title>Registration</title>
</head>
<body>
<form th:method="POST" th:action="@{/PET/login}" th:object="${user}">
<div>
<label for="login">Enter your login</label>
<input type="text" th:field="*{login}" id="login"/>
</div>
<div>
<label for="password">Enter your password</label>
<input type="password" th:field="*{password}" id="password"/>
</div>
<div>
<label for="email">Enter your email</label>
<input type="email" th:field="*{email}" id="email"/>
</div>
<input type="submit" value="create"/>
</form>
</body>
</html>
带密码的div
没有密码的div
【问题讨论】:
标签: html model-view-controller thymeleaf