我发现销售价格的百分比增加saleinpercentage比价格比自动计算saleprice [英] i have find percentage for sale price add saleinpercentage than on price than automaticaly calculate saleprice
本文介绍了我发现销售价格的百分比增加saleinpercentage比价格比自动计算saleprice的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
function sumCalc() {
var _txtPrice = document.getElementById('<%= txtPrice.ClientID %>');
var _txtSaleinPercantage = document.getElementById('<%= txtSaleinPercantage.ClientID %>');
var _txtSalePrice = document.getElementById('<%= txtSalePrice.ClientID %>');
var t1 = 0, t2 = 0;
if (_txtPrice != "") t1 = _txtPrice.value;
if (_txtSaleinPercantage != "") t2 = _txtSaleinPercantage.value;
var t3 = (parseInt(t2) * parseInt(t1)) ;
_txtSalePrice.value = (parseInt(t1) + (t3/100));
}
显示错误错误无法计算正确答案。
That show bug error not calculate right answer.
推荐答案
这段代码没有任何错误,这段代码给出了正确的百分比
this code is right not any mistack this code give right percentage
这篇关于我发现销售价格的百分比增加saleinpercentage比价格比自动计算saleprice的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文