0

I have this screen where I my user type a currency value on a Input element. When I save it on my Database, it goes like a text. Ie: 10000.

I am trying to show this value in another screen with a currency mask like $10.000 but I don´t want to use a input field. I am just showing the value inside a <ul> .

How do I do that with Javascript???

ThalesMiguel
  • 194
  • 2
  • 13
  • 3
    Possible duplicate of [How can I format numbers as money in JavaScript?](http://stackoverflow.com/questions/149055/how-can-i-format-numbers-as-money-in-javascript) – Damien Fayol Feb 15 '16 at 16:36

1 Answers1

1

Using

.toLocaleString('pt-BR', { style: 'currency', currency: 'BRL' })

did the trick.

Termininja
  • 6,620
  • 12
  • 48
  • 49
ThalesMiguel
  • 194
  • 2
  • 13