Get Post以及动态路由传值、Get Post数据解析到结构体、Post Xml数据解析到结构体

This commit is contained in:
2025-11-30 22:43:10 +08:00
parent a5ea950538
commit 4a8e355b73
2 changed files with 99 additions and 2 deletions

27
templates/pages/user.html Normal file
View File

@@ -0,0 +1,27 @@
{{/* 定义index页面模板 */}}
{{define "pages/user"}}
<!doctype html>
<html lang="zh">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>{{.title}}</title>
</head>
<body>
<form action="/addUser2" method="post">
<label for="username">用户名:</label>
<input type="text" id="username" name="username" required><br>
<label for="password">密码:</label>
<input type="password" id="password" name="password" required><br>
<label for="age">年龄:</label>
<input type="number" id="age" name="age" required><br>
<input type="submit" value="提交">
</form>
</body>
</html>
{{end}}