I want to get only positive values, is there any way to prevent it using only html
Please don't suggest validation method
You can could use something like <input type="number" name="test" min=0 save="" oninput="validity. valid ? this. save = value : value = this.
As we know, the <input type="number"> specifies a field for entering a number. If you want to restrict the <input> field to only positive numbers, you can use the min attribute.
Use the min
attribute like this:
<input type="number" min="0">
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With