Dynamic
Well-known member
Hi guys,
I guess this is not really related to Xenforo but I am using it in my pages.
I have made a simple calculator to estimate electricity bills. Now, there is a button that says "Calculate" and when it is clicked it displays the cost, eg ( 5.00 ) which is $5. What I am having trouble doing is getting the $ symbol in front of the number. Here is the code.
The onclick is what I would like to add the symbol to (in front of the calculateArea()
Thanks.
I guess this is not really related to Xenforo but I am using it in my pages.
I have made a simple calculator to estimate electricity bills. Now, there is a button that says "Calculate" and when it is clicked it displays the cost, eg ( 5.00 ) which is $5. What I am having trouble doing is getting the $ symbol in front of the number. Here is the code.
HTML:
<input type="button" name="calculate" id="area" size="4" onclick="calculateArea();" value="Calculate Daily Cost" class="checkout-btn">
The onclick is what I would like to add the symbol to (in front of the calculateArea()
Thanks.