HTML form表单使用
2020-12-18 08:33
标签:for nan 点击 通过 form 多行 cte input head HTML form表单使用 标签:for nan 点击 通过 form 多行 cte input head 原文地址:https://www.cnblogs.com/dengdingyue/p/14070398.html 1 DOCTYPE html>
2 html lang="en">
3 head>
4 meta charset="UTF-8" />
5 meta name="viewport" content="width=device-width, initial-scale=1.0" />
6 title>表单title>
7 head>
8 form action="需要提交的地址">
9 h2>输入框h2>
10
11 input type="text" placeholder="请输入用户名">
12
13 h2>密码框h2>
14
15 input type="password" placeholder="请输入密码">
16
17 h2>复选框h2>
18
19 input type="checkbox" checked>apple
20 input type="checkbox">banana
21
22 input type="checkbox" disabled>pear
23
24 h2>单选框h2>
25
26 input type="radio" name="gender">男
27 input type="radio" name="gender">女
28
29 input type="radio" name="gender" id="man">label for="man">男label>
30 input type="radio" name="gender" id="woman">label for="woman">女label>
31
32 h2>上传文件h2>
33 input type="file">
34
35 h2>提交/重置h2>
36 input type="submit">
37 input type="reset">
38
39 h2>多行文本框h2>
40
41 textarea name="" id="" cols="30" rows="10">textarea>
42
43 h2>下拉菜单h2>
44 select name="" id="">
45 option value="">苹果option>
46 option value="">香蕉option>
47 option value="">橘子option>
48 select>
49
50 h2>设置下拉菜单默认选项h2>
51
52 select name="" id="">
53 option value="">苹果option>
54 option value="" selected>香蕉option>
55 option value="">橘子option>
56 select>
57
58 select name="" id="">
59
60 option value="" selected disabled>请选择option>
61 option value="">苹果option>
62 option value="">香蕉option>
63 option value="">橘子option>
64 select>
65
66
67 select name="" id="" size="2">
68 option value="">苹果option>
69 option value="">香蕉option>
70 option value="">橘子option>
71 select>
72
73
74 select name="" id="" multiple>
75 option value="">苹果option>
76 option value="">香蕉option>
77 option value="">橘子option>
78 select>
79 form>
80 body>
81 html>