Blogger Information
Blog 6
fans 0
comment 0
visits 3188
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
表单控件学习展示
A
Original
544 people have browsed it


代码如下

  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="UTF-8">
  5. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  6. <title>Document</title>
  7. </head>
  8. <body>
  9. <form action="" id="biaodan">
  10. <!-- 文件上传 -->
  11. <section>
  12. <label for="wjsc">文件上传</label>
  13. <input type="file" id="wjsc" name="wjsc">
  14. <!-- 限制上传文件大小 -->
  15. <input type="hidden" name="MAX_FILE_SIZE" value="8388608">
  16. </section>
  17. <hr>
  18. <!-- 预定义符合框 简直不要太实用-->
  19. <section>
  20. <label for="yg">银行卡信息</label>
  21. <input type="text" name="yg" list="ygs" id="yg">
  22. <datalist id="ygs">
  23. <option value="洪千-|64433323231313213"></option>
  24. <option value="张三-|64432424233121213"></option>
  25. <option value="龙杰-|64432493242424563"></option>
  26. <option value="康康-|64432425675675773"></option>
  27. <option value="刘哥-|64432498679706433"></option>
  28. </datalist>
  29. </section>
  30. <hr>
  31. <section>
  32. <label for="age">年龄</label>
  33. <input type="number" id="age" max="99" min="10" value="10">
  34. </section>
  35. <hr>
  36. <!-- 按钮 -->
  37. <!-- formmethod:提交方式
  38. formaction:提交地址
  39. 表单中存在多个按钮时指定
  40. 如只有一个按钮 只需在form标签中指定即可
  41. -->
  42. <section>
  43. <label for="dl"></label>
  44. <button formaction="login.php" formmethod="post" id="dl">登录</button>
  45. </section>
  46. <hr>
  47. <!-- 下拉框 -->
  48. <section>
  49. <label for="xlk">下拉框:</label>
  50. <select name="xlk" id="xlk">
  51. <!-- 下拉分组 -->
  52. <optgroup label="分组1">
  53. <option value="1">我是1.1</option>
  54. <option value="2">我是1.2</option>
  55. <option value="3">我是1.3</option>
  56. </optgroup>
  57. <optgroup label="分组2">
  58. <option value="4">我是2.1</option>
  59. <option value="5">我是2.2</option>
  60. </optgroup>
  61. </select>
  62. </section>
  63. <br>
  64. <br>
  65. <br>
  66. <hr>
  67. <!-- 文本域 -->
  68. <section>
  69. <label for="wby">文本域</label>
  70. <textarea
  71. name="wby"
  72. id="wby"
  73. cols="30"
  74. rows="10"
  75. minlength="5"
  76. maxlength="100"
  77. placeholder="框内提示字符"
  78. onchange="alert('修改内容时触发')"
  79. onselect="alert('被选中时触发')"
  80. ></textarea>
  81. </section>
  82. </form>
  83. <!-- 表单分组 -->
  84. <fieldset name="base" form="biaodan">
  85. <legend>表单分组</legend>
  86. <section>
  87. <label for="email">邮箱</label>
  88. <input type="email" name="email" id="email">
  89. </section>
  90. </fieldset>
  91. </body>
  92. </html>
Correcting teacher:天蓬老师天蓬老师

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