场景 -- Bootstrap 提供了对所有原生的 HTML5 的 input 类型的支持,包括: text、password、datetime、datetime-local、date、month、time、week、number、email、url、search、tel 和 color。 适当的 type 声明是必需的,这样才能让 input 获得完整的样式。 举例 -- 添加对输入内容是否为数字的验证 只需要将type改为number,则只能输入数字 ![inputtype.png][1] [1]: https://samool.com/usr/uploads/2019/12/2744222382.png Loading... 场景 -- Bootstrap 提供了对所有原生的 HTML5 的 input 类型的支持,包括: text、password、datetime、datetime-local、date、month、time、week、number、email、url、search、tel 和 color。 适当的 type 声明是必需的,这样才能让 input 获得完整的样式。 举例 -- 添加对输入内容是否为数字的验证 只需要将type改为number,则只能输入数字 ![inputtype.png][1] [1]: https://samool.com/usr/uploads/2019/12/2744222382.png 最后修改:2019 年 12 月 14 日 © 允许规范转载 打赏 赞赏作者 支付宝微信 赞 支持就是力量