Blogger Information
Blog 28
fans 0
comment 0
visits 12959
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
表单实战之用户注册
手机用户1594223549
Original
436 people have browsed it

# 1.输出结果

2.代码部分

  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>表单实战之用户注册</title>
  8. </head>
  9. <body>
  10. <h2 >用户注册信息</h2>
  11. <form action="register.php" method="POST" enctype="multipart/form-data" target="_blank" id="register" />
  12. <fieldset>
  13. <!-- ! 注册信息 -->
  14. <legend>注册信息</legend>
  15. <!-- ! 1.用户名 -->
  16. <div class="username">
  17. <label for="myname">用户名:</label>
  18. <input
  19. type="text"
  20. id="myame"
  21. name="username"
  22. value=""
  23. placeholder="请输入您的用户名"
  24. required
  25. />
  26. </div>
  27. <!-- ! 2.密码 -->
  28. <div class="password">
  29. <label for="paword">密&emsp;码:</label>
  30. <input
  31. type="password"
  32. id="paword"
  33. name="password"
  34. value=""
  35. placeholder="请输入您的密码"
  36. required
  37. />
  38. </div>
  39. <!-- ! 3.email -->
  40. <div class="email">
  41. <label for="myemail">邮&emsp;箱:</label>
  42. <input
  43. type="email"
  44. id="myemail"
  45. name="email"
  46. value=""
  47. placeholder="XXXX@163.com"
  48. />
  49. </div>
  50. <!-- ! 4.博客 -->
  51. <div class="blog">
  52. <label for="myblog">博&emsp;客:</label>
  53. <input
  54. type="url"
  55. id="myblog"
  56. name="blog"
  57. value=""
  58. placeholder="http://"
  59. />
  60. </div>
  61. <!-- ! 5.年龄 -->
  62. <div class="age">
  63. <label for="myage">年&emsp;龄:</label>
  64. <input
  65. type="number"
  66. id="myage"
  67. name="age"
  68. value="18"
  69. min="18"
  70. max="80"
  71. step="2"
  72. />
  73. </div>
  74. <!-- ! 6.生日 -->
  75. <div class="birthday">
  76. <label for="mybirthday">生&emsp;日:</label>
  77. <input
  78. type="date"
  79. id="mybirthday"
  80. name="birthday"
  81. value="2022-10-19"
  82. min="1940-05-01"
  83. max="2022-10-18"
  84. </div>
  85. <!-- ! 7.性别 -->
  86. <div class="gender">
  87. <label for="secret">性&emsp;别:</label>
  88. <input type="radio" name="gender" value="male" id="male"><label for="male"></label>
  89. <input type="radio" name="gender" value="female" id="female" ><label for="female"></label>
  90. <input type="radio" name="gender" value="secret" id="secret" checked><label for="secret">保密</label>
  91. </div>
  92. <!-- ! 8.爱好 -->
  93. <div class="hobby">
  94. <label>爱&emsp;好:</label>
  95. <input type="checkbox" name="hobby[]" value="music" id="music" checked><label for="music">音乐</label>
  96. <input type="checkbox" name="hobby[]" value="game" id="game"><label for="game">游戏</label>
  97. <input type="checkbox" name="hobby[]" value="trave" id="trave"><label for="trave">旅游</label>
  98. <input type="checkbox" name="hobby[]" value="sleep" id="sleep"><label for="sleep">睡觉</label>
  99. </div>
  100. <!-- ! 9.学历 -->
  101. <div class="edu">
  102. <label for="edu">学&emsp;历:</label>
  103. <select name="edu" id="edu" form="">
  104. <option value="" selected disabled>--请选择--</option>
  105. <option value="0">文盲</option>
  106. <optgroup label="义务教育">
  107. <option value="1">小学</option>
  108. <option value="2">初中</option>
  109. <option value="3">高中</option>
  110. </optgroup>
  111. <optgroup label="高等教育">
  112. <option value="4">专科</option>
  113. <option value="5">本科</option>
  114. <option value="6">硕士</option>
  115. <option value="7">博士</option>
  116. </optgroup>
  117. </select>
  118. </div>
  119. <!-- ! 10.头像 -->
  120. <div class="upload" >
  121. <label for="upload">头&emsp;像:</label>
  122. <input type="file" name="user_pic" id="upload" />
  123. <button type="button">上传照片</button>
  124. </div>
  125. <!-- ! 11.自我评价 -->
  126. <div>
  127. <label for="comment">自我评价:</label></br>
  128. <textarea name="comment" id="comment" cols="28" rows="4" maxlength="300" style="resize: none" placeholder="请写一个不少于50字的自我评价"></textarea>
  129. </div>
  130. <button type="submit">立即提交</button>
  131. </fieldset>
  132. </form>
  133. </body>
  134. </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