177
rated 0 times
[
181]
[
4]
/ answers: 1 / hits: 84438
/ 14 Years ago, fri, december 10, 2010, 12:00:00
Possible Duplicate:
JavaScript: formatting number with exactly two decimals
Getting a bit muddled up using variables and now cant seem to get calculation to work at all!?
$(#discount).change(function(){
var list = $(#list).val();
var discount = $(#discount).val();
var price = $(#price);
var temp = discount * list;
var temp1 = list - temp;
var total = parseFloat($(this).temp1()).toFixed(2);
price.val(total);
});
More From » jquery