1 <!DOCTYPE html>
2 <html>
3
4 <head>
5 <title>单选复选框</title>
6 <meta charset="utf-8">
7 <meta name="author" content="王思怡">
8 <style>
9 body {
10 background: pink;
11 }
12
13 p {
14 color: gray;
15 }
16 </style>
17 </head>
18
19 <body>
20 <form>
21 <label><input type = "radio" name = "sex"/>男</label>
22 <label><input type = "radio" name = "sex"/>女</label>
23 <label><input type = "radio" name = "sex"/>不明</label>
24 <br/>
25 <label><p>请选择您喜欢的水果</p></label>
26 <label><input type = "checkbox" name = "fruits"/>苹果</label>
27 <label><input type = "checkbox" name = "fruits"/>香蕉</label>
28 <label><input type = "checkbox" name = "fruits"/>菠萝</label>
29 <label><input type = "checkbox" name = "fruits"/>橘子</label>
30 <label><input type = "checkbox" name = "fruits"/>西瓜</label>
31 <label><input type = "checkbox" name = "fruits"/>芒果</label>
32 <label><input type = "checkbox" name = "fruits"/>哈密瓜</label>
33 <br/>
34 <br/>
35 <input type="submit" name="submit" value="提交" />
36 <input type="reset" name="reset" value="重置" />
37 </form>
38 </body>
39
40 </html>
1 <!DOCTYPE html>
2 <html>
3
4 <head>
5 <title>时间</title>
6 <meta charset="utf-8">
7 <meta name="author" content="王思怡">
8 <style>
9 body {
10 background: pink;
11 }
12 </style>
13 </head>
14
15 <body>
16 <form method="post">
17 <label>时间:<input type = "time" name = "time"/></label>
18 <br/>
19 <br/>
20 <label>年月:<input type = "month" name = "month"/></label>
21 <br/>
22 <br/>
23 <label>星期:<input type = "week" name = "week"/></label>
24 <br/>
25 <br/>
26 <label>本机时间:<input type = "datetime-local" name = "datetime-local"/></label>
27 <br/>
28 <br/>
29 <input type="submit" value="提交" />
30 <input type="reset" value="重置" />
31 </form>
32 </body>
33
34 </html>
![](https://img2018.cnblogs.com/blog/1631716/201906/1631716-20190612155327655-977180049.png)
![](https://img2018.cnblogs.com/blog/1631716/201906/1631716-20190612155332978-439890676.png)