📜  输入数字有空值 - 无论代码示例

📅  最后修改于: 2022-03-11 14:59:10.547000             🧑  作者: Mango

代码示例1
The hack is to use type="tel" instead of type="number".

This solves the 2 main issues:

It pulls up a number keypad on mobile devices
It validates (and is not empty) with numbers or non-numbers as input.