问题描述
https://www.w3schools.com/tags/tryit.asp?filename=tryhtml5_input_max_min 重现:输入大于最大值的输入值,将光标保持在输入中,将鼠标移到外部,然后在输入内部,等待。你会收到消息。怎么去掉??
解决方法
在输入字段上使用空的 title
属性。这会在提交时维护表单验证。
<input title="" type="number" id="quantity" name="quantity" min="1" max="5">