Answers for "html input type number limit decimal places"

5

input decimal html

<input type="number" class="form-control" required name="balance" min="0" value="0" step="any"/>
Posted by: Guest on September-09-2021
-2

javascript - How to use limit input to 2 decimal places

//HazaaZOOZ - javascript - How to use 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;
}
Posted by: Guest on February-04-2021

Code answers related to "html input type number limit decimal places"

Browse Popular Code Answers by Language