D
davidchase314
Hi. I was just wondering how I could get the output of this bit of
Javascript to round up to two decimal places. My code is below. Thank
you.
"<script language="JavaScript">
<!--
var price1 = 2.99
var price2 = 13.98
var price3 = 8.95
var price4 = 1.99
var oprice = price1 + price2 + price3 + price4
document.write(oprice)
//-->
</script>"
The output I'm getting is 27.909999999999996
Thanks again.
Javascript to round up to two decimal places. My code is below. Thank
you.
"<script language="JavaScript">
<!--
var price1 = 2.99
var price2 = 13.98
var price3 = 8.95
var price4 = 1.99
var oprice = price1 + price2 + price3 + price4
document.write(oprice)
//-->
</script>"
The output I'm getting is 27.909999999999996
Thanks again.