This commit is contained in:
z66
2025-09-03 11:19:03 +08:00
parent 584548d006
commit 2eeaa699c7
13 changed files with 347 additions and 1 deletions
+17
View File
@@ -0,0 +1,17 @@
<!DOCTYPE html>
<html>
<head>
<title>Form Example</title>
</head>
<body>
<form action="/submit" method="post">
<label for="name">Name:</label>
<input type="text" id="name" name="name">
<br>
<label for="email">Email:</label>
<input type="email" id="email" name="email">
<br>
<input type="submit" value="Submit">
</form>
</body>
</html>
+9
View File
@@ -0,0 +1,9 @@
<!DOCTYPE html>
<html>
<head>
<title>Hello</title>
</head>
<body>
<h1>Hello, {{ name }}!</h1>
</body>
</html>
+14
View File
@@ -0,0 +1,14 @@
<!DOCTYPE html>
<html>
<head>
<title>Upload File</title>
</head>
<body>
<form action="/upload" method="post" enctype="multipart/form-data"> <!--enctype指定表单类型,支持文件上传 -->
<label for="file">File:</label>
<input type="file" id="file" name="file">
<br>
<input type="submit" value="Upload">
</form>
</body>
</html>
+22
View File
@@ -0,0 +1,22 @@
<!DOCTYPE html>
<html>
<head>
<title>Form Example</title>
</head>
<body>
<form method="post">
{{ form.hidden_tag() }}
<div>
{{ form.name.label }}<br>
{{ form.name(size=32) }}
</div>
<div>
{{ form.email.label }}<br>
{{ form.email(size=32) }}
</div>
<div>
{{ form.submit() }}
</div>
</form>
</body>
</html>