The example:
Price
Enter Quantity
Notice the result is "4.5", not "4.50", we'll create a function that will format the numbers correctly.
function format(value){ value*=100; value+=""; return value.substring(0,value.length-2)+"."+value.substring(value.length-2); }
More Maths.- a better formatting function