学习第一天完
This commit is contained in:
32
前端Web(HTML+CSS)/12.表单标签.html
Normal file
32
前端Web(HTML+CSS)/12.表单标签.html
Normal file
@@ -0,0 +1,32 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>表单标签</title>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<!-- form表单
|
||||
get: 提交数据时, 数据会以参数的形式发送给服务器
|
||||
post: 提交数据时, 数据会以请求体的形式发送给服务器
|
||||
action: 表单提交时, 数据发送到的服务器地址
|
||||
method: 默认是get
|
||||
method: get/post
|
||||
enctype: 表单提交时, 数据的编码方式
|
||||
enctype: application/x-www-form-urlencoded
|
||||
enctype: multipart/form-data
|
||||
enctype: text/plain
|
||||
注意:
|
||||
1. get方法提交的数据, 会显示在地址栏中, 不安全
|
||||
2. post方法提交的数据, 不会显示在地址栏中, 安全
|
||||
-->
|
||||
<form action="/save" method="post">
|
||||
姓名: <input type="text" name="name"></input>
|
||||
年龄: <input type="text" name="age"></input>
|
||||
<input type="submit" value="提交">
|
||||
</form>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
Reference in New Issue
Block a user