input type that allows float number
<input type="number" step="0.01">
input type that allows float number
<input type="number" step="0.01">
javascript show 2 decimal places
var myNumber=12.2345;
var myNumberWithTwoDecimalPlaces=parseFloat(myNumber).toFixed(2); //12.23
javascript limit input to 2 decimal places
var validate = function(e) {
var t = e.value;
e.value = (t.indexOf(".") >= 0) ? (t.substr(0, t.indexOf(".")) + t.substr(t.indexOf("."), 3)) : t;
}
javascript limit input to 2 decimal places
34
43
34
23
1
2
3
4
5
6
6
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us