$('.modal-l2-confirm a').on('click', function(e){
var thisItemId = $(this).attr('item-id'),
thisItemCount = $(this).attr('item-amount'),
startPrice = $('.modal-l2-price input').val(),
priceBuy = $('.modal-l2-priceBuyNow input').val(),
priceStep = $('.modal-l2-priceStep input').val(),
countAu = $('.modal-l2-count input').val(),
renewal = $('.modal-l2-renewal input').is(':checked'),
preiod = $('.modal-l2-period input').val();
if(countAu == ''){
countAu = 1;
}
if(countAu > thisItemCount){ //执行到这里出错
countAu = thisItemCount;
}
在浏览器设置断点单步执行的时候,大多数情况下countAu值小于thisItemCount值的时候,仍然会执行大括号里的内容 countAu = thisItemCount; 我完全不能理解这是咋回事... 求大佬们帮忙看看可能出错在哪里?
var thisItemId = $(this).attr('item-id'),
thisItemCount = $(this).attr('item-amount'),
startPrice = $('.modal-l2-price input').val(),
priceBuy = $('.modal-l2-priceBuyNow input').val(),
priceStep = $('.modal-l2-priceStep input').val(),
countAu = $('.modal-l2-count input').val(),
renewal = $('.modal-l2-renewal input').is(':checked'),
preiod = $('.modal-l2-period input').val();
if(countAu == ''){
countAu = 1;
}
if(countAu > thisItemCount){ //执行到这里出错
countAu = thisItemCount;
}
在浏览器设置断点单步执行的时候,大多数情况下countAu值小于thisItemCount值的时候,仍然会执行大括号里的内容 countAu = thisItemCount; 我完全不能理解这是咋回事... 求大佬们帮忙看看可能出错在哪里?