I want to create a input field in html where can limit the users to enter a number only between the range -40 to 130.
The user can also enter decimal values
For example :
-40.
You can use an input of type number with the attributes min max and step like this :
I provide a JSFiddle here. When you try to submit the form, the html5 validation displays a message if the number is out of the bounds or with more than one decimals.