Blogger Information
Blog 34
fans 0
comment 0
visits 20641
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
html表单的基本使用
小庄
Original
588 people have browsed it

html表单的基本使用

  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="UTF-8">
  5. <meta http-equiv="X-UA-Compatible" content="IE=edge">
  6. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  7. <title>Document</title>
  8. </head>
  9. <!-- 作业内容: -->
  10. <!-- 1. 制作一个用户注册表单,将课堂上提到的表单控件全部用到; -->
  11. <!-- 2. 理解css模块的思想,并试写一个案例(选做) -->
  12. <!-- 3. 实例演示基本选择器与上下文选择器 -->
  13. <!-- 4. 预习伪类选择器与常用元素的css样式设置,盒模型知识等 -->
  14. <style>
  15. .register{
  16. margin: 0 auto;
  17. width: 793.6px;
  18. }
  19. .reg-detail{
  20. padding: 38.400000000000006px 224px 52px;
  21. }
  22. .reg-detail div{
  23. padding-top: 30px;
  24. }
  25. .reg-tetail-username input{
  26. width: 83%;
  27. }
  28. .sex select{
  29. width: 34%;
  30. float: right;
  31. }
  32. </style>
  33. <body>
  34. <div class="detail">
  35. <div class="register">
  36. <h3>用户注册</h3>
  37. <div class="reg-detail">
  38. <form action="index.php" method="GET">
  39. <div class="reg-tetail-username">
  40. <div class="user">
  41. <label for="">帐号:</label>
  42. <input type="text" name="username" autofocus required placeholder="输入用户名">
  43. </div>
  44. <div class="pw">
  45. <label for="">密码:</label>
  46. <input type="password" name="pwd" required placeholder="输入密码不少于8位">
  47. </div>
  48. <div class="emai">
  49. <label for="">邮箱:</label>
  50. <input type="email" name="email" required placeholder="123@qq.com">
  51. </div>
  52. </div>
  53. <div class="sex">
  54. <label for="moren">性别:</label>
  55. <input type="radio" name="gender" value="nan"><label for=""></label>
  56. <input type="radio" name="gender" value="nv"><label for=""></label>
  57. <input type="radio" name="gender" value="ps" checked id="moren"><label for="">保密</label>
  58. <select name="level" id="">
  59. <option value="1">西南地区</option>
  60. <option value="4">东北地区</option>
  61. <option value="4">华南地区</option>
  62. <option value="4">华北地区</option>
  63. <option value="3" selected>---请选择地区---</option>
  64. </select>
  65. </div>
  66. <div class="aihao">
  67. <label for="">爱好:</label>
  68. <input type="checkbox" name="check[]" id="game" checked><label for="game">游戏</label>
  69. <input type="checkbox" name="check[]" id="lvyou"><label for="lvyou">旅游</label>
  70. <input type="checkbox" name="check[]" id="sheying" checked><label for="sheying">摄影</label>
  71. </div>
  72. <div>
  73. <button style="width: 100%;">提交</button>
  74. </div>
  75. </form>
  76. </div>
  77. </div>
  78. </div>
  79. </body>
  80. </html>
Correcting teacher:PHPzPHPz

Correction status:qualified

Teacher's comments:
Statement of this Website
The copyright of this blog article belongs to the blogger. Please specify the address when reprinting! If there is any infringement or violation of the law, please contact admin@php.cn Report processing!
All comments Speak rationally on civilized internet, please comply with News Comment Service Agreement
0 comments
Author's latest blog post