博客列表 >纯html编写用户注册页面

纯html编写用户注册页面

逍遥php
逍遥php原创
2022年10月20日 00:49:33426浏览

代码

  1. <h3>用户注册</h3>
  2. <form
  3. action="register,php"
  4. method="POSt"
  5. enctype="application/x-www-form-urlencoded"
  6. target="_blank"
  7. id="test"
  8. >
  9. <fieldset>
  10. <legend>基本信息</legend>
  11. <div class="upload">
  12. <label for="upload">头像:</label>
  13. <input type="file" id="upload" name="user_pic" />
  14. <button type="button">上传</button>
  15. </div>
  16. <div class="username">
  17. <label for="username">用户名:</label>
  18. <input
  19. type="text"
  20. id="username"
  21. value=""
  22. name="username"
  23. placeholder="请输入用户名"
  24. required
  25. />
  26. </div>
  27. <div class="pwd">
  28. <label for="pwd">密码</label>
  29. <input
  30. type="password"
  31. name="pwd"
  32. id="pwd"
  33. value="123456"
  34. placeholder="请输入密码"
  35. required
  36. />
  37. <button
  38. type="button"
  39. onclick="this.previousElementSibling.type='text'"
  40. >
  41. 显示密码
  42. </button>
  43. </div>
  44. <div class="email">
  45. <label for="email">邮箱:</label>
  46. <input
  47. type="email"
  48. id="email"
  49. name="email"
  50. placeholder="xxx@xx.xxx"
  51. />
  52. </div>
  53. <div class="sex">
  54. <label for="sex">性别:</label>
  55. <input type="radio" name="sex" value="man" id="man" /><label for="man"
  56. ></label
  57. >
  58. <input type="radio" name="sex" value="weman" id="weman" /><label
  59. for="weman"
  60. ></label
  61. >
  62. </div>
  63. <div class="db">
  64. <label for="db">出生日期:</label>
  65. <input
  66. type="date"
  67. id="db"
  68. name="db"
  69. min="1970-01-01"
  70. max="2030-01-01"
  71. />
  72. </div>
  73. <div class="age">
  74. <label for="age">年龄:</label>
  75. <input
  76. type="number"
  77. id="age"
  78. value="18"
  79. min="18"
  80. max="150"
  81. step="1"
  82. />
  83. </div>
  84. <div class="hobby">
  85. <label for="">爱好:</label>
  86. <input type="checkbox" name="hobby[]" id="game" value="game" />
  87. <label for="game">游戏</label>
  88. <input type="checkbox" name="hobby[]" id="a" value="a" checked />
  89. <label for="a">编程</label>
  90. <input type="checkbox" name="hobby[]" id="b" value="b" />
  91. <label for="b">电影</label>
  92. <input type="checkbox" name="hobby[]" id="c" value="c" />
  93. <label for="c">旅游</label>
  94. </div>
  95. </fieldset>
  96. </form>

效果展示

声明:本文内容转载自脚本之家,由网友自发贡献,版权归原作者所有,如您发现涉嫌抄袭侵权,请联系admin@php.cn 核实处理。
全部评论
文明上网理性发言,请遵守新闻评论服务协议