前端表单控件作业

编辑: admin 分类: 电脑知识 发布时间: 2023-06-14 来源:互联网
  1. <div style="width: 300px">
  2. <form action="22.php" method="post">
  3. <fieldset style="display: inline-grid; gap: 1em">
  4. <legend>新用户注册</legend>
  5. <div>
  6. <label for="user">用户名</label><input type="text" id="user" placeholder="不少于7位" required autofocus />
  7. </div>
  8. <div><label for="password">密码</label><input type="password" id="password" /></div>
  9. <div><label for="email">邮箱</label><input type="email" id="email" /></div>
  10. <div>
  11. <label for="baomi">性别</label><input type="radio" id="male" name="sex" /><label for="male">男</label>
  12. <input type="radio" id="female" name="sex" /><label for="female">女</label>
  13. <input type="radio" id="baomi" checked name="sex" /><label for="baomi">保密</label>
  14. </div>
  15. <div>
  16. <label for="">爱好</label>
  17. <input type="checkbox" name="hobby[]" id="travel" /><label for="travel">旅游</label>
  18. <input type="checkbox" name="hobby[]" id="progrem" /><label for="progrem">编程</label>
  19. <input type="checkbox" name="hobby[]" id="comic" /><label for="comic">漫画</label>
  20. <input type="checkbox" name="hobby[]" id="game" /><label for="game">游戏</label>
  21. </div>
  22. <div>
  23. <label for="">学历</label>
  24. <select name="edu" id="">
  25. <option value="1" selected disabled>-未选择-</option>
  26. <option value="2">中专</option>
  27. <option value="3">大专</option>
  28. <option value="4">本科</option>
  29. </select>
  30. </div>
  31. <button
  32. style="
  33. border: 0;
  34. width: 200px;
  35. height: 25px;
  36. margin: 0 auto;
  37. cursor: pointer;
  38. background-color: lightblue;
  39. color: azure;
  40. "
  41. >
  42. 提交
  43. </button>
  44. </fieldset>
  45. </form>
  46. </div>

【文章原创作者:防ddos攻击 http://www.558idc.com/shsgf.html 复制请保留原URL】