Welcome to WebmasterWorld Guest from 184.108.40.206 , register , free tools , login , search , pro membership , help , library , announcements , recent posts , open posts Become a Pro Member
I'm new to JS and I figured out how to do an online order form but I donít know how to reduce the decimal point to 2 decimal points, or round up ($104.92). The sales tax in my state is .086 and after multiplying by the Subtotal I get some pretty long numbers on my tax total based on the item chosen. Can anyone help?
That's an oddball tax rate. ;)
var subtotal = 1220; var taxrate = .086; var tax = Math.round((subtotal * taxrate)*100)/100; var total = subtotal + tax;
Hope this helps.
Thank you so much Key_Master. I"m new at JS but i'm starting to get the hang of it. I just stumbled onto webmasterworld tonight and i can see it's going to be very useful thanks to people like you :-)