标签:
var SecondPrice = document.getElementById("txtSecondPrice"); //秒杀价
var MarketPrice = document.getElementById("txtMarketPrice"); //市场价
var SavePrice = document.getElementById("txtSavePrice"); //节省价
SavePrice.value = Math.round((parseFloat(MarketPrice.value) - parseFloat(SecondPrice.value))*100)/100;//保留2位小数。
标签:
原文地址:http://www.cnblogs.com/jkyweb/p/4503316.html