I have many results being output from variables into spans, for example:
JavaScript document.getElementById("ResultsSavingsPerDay").innerHTML = SavingsPerDay;
HTML
Savings per day: <span id="ResultsSavingsPerDay"></span> Thai Baht
which may display the result as something like: 4347.343543654
How can I format the output to the currency to display as 4,347.34? And if the output is a negative figure then change the font color to red also?
I have seen similar currency formats on Stack Overflow, but not changing the results within a span. It is this part that I am struggling with mainly.