-3
rated 0 times
[
3]
[
6]
/ answers: 1 / hits: 13551
/ 10 Years ago, wed, june 4, 2014, 12:00:00
I just want to ask how to make a JavaScript of currency format of input type text. Is it possible that the numbers will have comma while you type the number? Also, how to make the number fixed with 2 decimal numbers. If I input a 3 decimal placed numbers the last number will round off so it can be 2 decimal.
I have a textbox which accepts numbers only and I want it to automatically convert the numbers into currency format. 1234.556
will be Php 1,234.56
. (Php means Philippine peso)
Here's my input type text:
<input type=text name='Etxt11' placeholder=Proposed price onblur=this.value = 'Php ' + formatNumber(this.value) />
More From » format