Hi, the search functionality in this fourm(s) are not working, sure this has been done prior, sry for the redundancy if so.
I have a variable that can be:
10.1 or 5 or 5.00
I would like to format this as money, this is what i have so far, am not good with javascript, thanks for the help!
fMoney = function(str) {
var re = new RegExp(str);
document.getElementById("subtotal").innerHTML = /^\$?[1-9][0-9]{0,2}(,[0-9]{3})*(\.[0-9]{2})?$/;
}
I have a variable that can be:
10.1 or 5 or 5.00
I would like to format this as money, this is what i have so far, am not good with javascript, thanks for the help!
fMoney = function(str) {
var re = new RegExp(str);
document.getElementById("subtotal").innerHTML = /^\$?[1-9][0-9]{0,2}(,[0-9]{3})*(\.[0-9]{2})?$/;
}