问题描述
$("#vehMaintainEbo_price").blur(function(){varvehMaintainEbo_qty=parseFloat($("#vehMaintainEbo_qty").val()));varthisVal=parseFloat(($(this).val()));if(vehMaintainEbo_qty!=""thisVal!=""){$("#cell-vehMaintainEbo-subtotal").text(parseFloat(thisVal)*parseFloat(vehMaintainEbo_qty));$("#vehMaintainEbo_subtotal").val(parseFloat(thisVal)*parseFloat(vehMaintainEbo_qty));//没有问题}});$("#vehMaintainEbo_qty").blur(function(){varvehMaintainEbo_price=parseFloat($("#vehMaintainEbo_price").val()));varthisVal=parseFloat(vehMaintainFlow.checkNum(String($(this).val())));if(vehMaintainEbo_price!=""&&thisVal!=""){$("#cell-vehMaintainEbo-subtotal").text(parseFloat(thisVal)*parseFloat(vehMaintainEbo_price));$("#vehMaintainEbo_subtotal").val(parseFloat(thisVal)*parseFloat(vehMaintainEbo_qty));//加上这句就包juqery错误,注释点就没有报jquery错误。}});请js告诉帮忙,无奈啊。谢谢。
解决方案
解决方案二:
IE8+chromeopreafirefox都有控制台的,
解决方案三:
$("#vehMaintainEbo_subtotal").val(parseFloat(thisVal)*parseFloat(vehMaintainEbo_qty));这里vehMaintainEbo_qty没定义还是vehMaintainEbo_price?
解决方案四:
$("#vehMaintainEbo_qty").blur(function(){varvehMaintainEbo_price=parseFloat($("#vehMaintainEbo_price").val()));varthisVal=parseFloat(vehMaintainFlow.checkNum(String($(this).val())));if(vehMaintainEbo_price!=""&&thisVal!=""){$("#cell-vehMaintainEbo-subtotal").text(parseFloat(thisVal)*parseFloat(vehMaintainEbo_price));$("#vehMaintainEbo_subtotal").val(parseFloat(thisVal)*parseFloat(vehMaintainEbo_qty));vehMaintainEbo_qty都没定义,肯定报错啊});我估计你是想写vehMaintainEbo_price$("#vehMaintainEbo_subtotal").val(parseFloat(thisVal)*parseFloat(vehMaintainEbo_price));
解决方案五:
调试
解决方案六:
vehMaintainEbo_qty=>$(this).val()
解决方案七:
仔细仔细
解决方案八:
$("#vehMaintainEbo_price").blur(function(){varvehMaintainEbo_qty=parseFloat($("#vehMaintainEbo_qty").val()));varthisVal=parseFloat(($(this).val()));if(vehMaintainEbo_qty!=""thisVal!=""){$("#cell-vehMaintainEbo-subtotal").text(parseFloat(thisVal)*parseFloat(vehMaintainEbo_qty));$("#vehMaintainEbo_subtotal").val(parseFloat(thisVal)*parseFloat(vehMaintainEbo_qty));//没有问题}});$("#vehMaintainEbo_qty").blur(function(){varvehMaintainEbo_price=parseFloat($("#vehMaintainEbo_price").val()));varthisVal=parseFloat(vehMaintainFlow.checkNum(String($(this).val())));if(vehMaintainEbo_price!=""&&thisVal!=""){$("#cell-vehMaintainEbo-subtotal").text(parseFloat(thisVal)*parseFloat(vehMaintainEbo_price));$("#vehMaintainEbo_subtotal").val(parseFloat(thisVal)*parseFloat(vehMaintainEbo_price));//加上这句就包juqery错误,注释点就没有报jquery错误。}});仔细看看
解决方案九:
if(vehMaintainEbo_qty!=""thisVal!=""){这句的&&呢?