3.输入类型.html 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  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="">
  10. <!-- text文本 -->
  11. <input type="text">
  12. <br>
  13. <!-- email 邮箱 校验 -->
  14. <input type="email">
  15. <br>
  16. <!-- color 调色 -->
  17. <input type="color" value="#ff0000">
  18. <br>
  19. <!-- 提交按钮 -->
  20. <input type="submit">
  21. <!-- date 日期 -->
  22. <input type="date" value="2012-01-01">
  23. <br>
  24. <!-- time事件 -->
  25. <input type="time">
  26. <br>
  27. <!-- search 搜索 出现清除按钮 -->
  28. <input type="search">
  29. <br>
  30. <!-- range 划块类型
  31. slot 定义划块距离
  32. -->
  33. <input type="range">
  34. <br>
  35. <input type="range" slot="20">
  36. <br>
  37. <!-- number 数字 max最大值 min 最小值
  38. step 定义数值 min + step
  39. -->
  40. <input type="number" max="10" min="3" step="3">
  41. <br>
  42. <!-- tel 手机号
  43. maxlength可以输入的最大值
  44. -->
  45. <input type="tel" maxlength="11">
  46. <br>
  47. <!-- file上传文件
  48. accept 上传文件类型
  49. -->
  50. <input type="file" accept="image/jpg,image/png">
  51. <select name="" id="">
  52. <option value="11">11</option>
  53. <option value="22">22</option>
  54. </select>
  55. <input type="text" list="list1">
  56. <datalist id="list1">
  57. <option value="我的">1</option>
  58. <option value="你的">2</option>
  59. </datalist>
  60. </form>
  61. </body>
  62. </html>