how to give number format to a input box text while I am typing it
Carlos Alberto

Carlos Alberto @charlygarcia120

About: programming the world

Location:
Bogota
Joined:
Apr 26, 2020

how to give number format to a input box text while I am typing it

Publish Date: Jun 29 '21
0 0


<br>
function format_num(id) {<br>
var number = document.getElementById(&quot;principal&quot;).value;<br><br>
var checkedNew = number.split(&#39;.&#39;).join(&quot;&quot;);<br><br>
document.getElementById(&quot;principal&quot;).value = checkedNew.toString().replace(/\B(?=(\d{3})+(?!\d))/g, &quot;.&quot;);<br><br>
}<br>














Comments 0 total

    Add comment