Código Javascript:
Ver original
function calculo(cantidad,precio,inputtext,totaltext){ gndtotal= totaltext.value-inputtext.value; // Calculo del subtotal subtotal = precio*cantidad; inputtext.value=subtotal; //Calculo del total total = eval(gndtotal); totaltext.value = total + subtotal; }
Gracias y saludos!