This is the code I have, it returns numbers in currency format but I wish to add the dollar sign ($) before the numbers.
document.getElementById("numbers").onblur = function (){
this.value = parseFloat(this.value.replace(/,/g, ""))
.toFixed(2)
.toString()
.replace(/\B(?=(\d{3})+(?!\d))/g, ",");
}
The id numbers refers to a input text
Thanks!