jQuery的结果错误(简单乘法)

时间:2019-05-06 18:19:25

标签: jquery html jscript

我正在尝试在2个输入之间做一个简单的乘法 使用jQuery,但结果不能正确计算第二个值 结果总是错误的

enter image description here

function getTotal(costo, cantidad, index) {

resultado = parseFloat(cantidad) * parseFloat(costo);
console.log(resultado);
$("#txtTotalTabla" + index).html(resultado);}

0 个答案:

没有答案
相关问题