Blogger Information
Blog 11
fans 0
comment 0
visits 3156
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
form表单制作
至亲难忘
Original
308 people have browsed it
  1. <!DOCTYPE html>
  2. <html lang="zh-CN">
  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. <body>
  10. <!-- action:处理表单数据脚本的url地址 -->
  11. <!-- method:表单的提交方式 -->
  12. <from action="register.php" method="post">
  13. <!-- fieldset:表单空件的分组 -->
  14. <fieldset style="display: inline-grid; gap: 1em">
  15. <legend>用户注册</legend>
  16. <div class="username">
  17. <label for="">用户名:</label>
  18. <!-- type="text":单行文本框 -->
  19. <!-- autofocus:页面初始化/加载成功时,焦点自动落入。 -->
  20. <!-- required:必填项,不写不能提交 -->
  21. <input type="text" id="username" name="username" value="" placeholder="不少于六位数" autofocus required>
  22. </div>
  23. <div class="email">
  24. <label for="email">邮箱:</label>
  25. <input type="email" id="email" name="email" placeholder="请输入正确的格式!" required>
  26. </div>
  27. <div class="password">
  28. <label for="">密码:</label>
  29. <input type="password" id="password" name="password" placeholder="输入不少于6位数的密码" required>
  30. <button>查看</button>
  31. </div>
  32. <div class="age">
  33. <label for="age">年龄:</label>
  34. <input type="number" id="age" name="age" min="18" max="80">
  35. </div>
  36. <div class="birthday">
  37. <label for="birthday">生日:</label>
  38. <input type="date" id="birthday" name="birthday" value="2008-08-08" min="1949-10-01">
  39. </div>
  40. <div class="sex">
  41. <label for="sex">性别:</label>
  42. <input type="radio" name="sex" value="male" id="male" checked><label for="male"></label>
  43. <input type="radio" name="sex" value="male" id="female"><label for="male"></label>
  44. <input type="radio" name="sex" value="male" id="secret"><label for="male">保密</label>
  45. </div>
  46. <div class="hobby">
  47. <label for="">爱好:</label>
  48. <input type="checkbox" name="hobby[]" value="trave" id="trave"><label for="trave">旅游</label>
  49. <input type="checkbox" name="hobby[]" value="trave" id="programe"><label for="programe">编程</label>
  50. <input type="checkbox" name="hobby[]" value="trave" id="shoot"><label for="shoot">摄影</label>
  51. <input type="checkbox" name="hobby[]" value="trave" id="food"><label for="food">美食</label>
  52. </div>
  53. <div class="education">
  54. <label for="">学历:</label>
  55. <select name="education">
  56. <option value="1">中学</option>
  57. <option value="2">高中</option>
  58. <option value="3">大学</option>
  59. <option value="4">研究生</option>
  60. </select>
  61. </div>
  62. <button>提交</button>
  63. </fieldset>
  64. </from>
  65. </body>
  66. </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