且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

jQuery无法从每个函数获取值

更新时间:2022-11-26 16:36:43

您使用了错误的变量.使用价格代替pr

You're using the incorrect variable. Use price instead of pr

$('.subtotal').each(function(){
        var price = $(this).parent().parent().find('td input.price');
        console.log(price.val()); //This should be price not pr
 });