How to make type=“number” to positive numbers only

后端 未结 17 2412
既然无缘
既然无缘 2020-11-30 17:12

currently I have the following code


it comes out to something like this

17条回答
  •  庸人自扰
    2020-11-30 17:56

    If you try to enter a negative number, the onkeyup event blocks this and if you use the arrow on the input number, the onblur event resolves that part.

提交回复
热议问题