JSFiddle - React, Tailwind, and code Playground
HTML
Enter a number: <input name="number"></input>
JavaScript
document.getElementsByTagName('input')[0].onblur = function() {
this.value = this.value.replace(/^0+(?=\d)/,'');
}
Enter a number: <input name="number"></input>
document.getElementsByTagName('input')[0].onblur = function() {
this.value = this.value.replace(/^0+(?=\d)/,'');
}