getting the value of dynamically created textbox using jquery

前端 未结 6 936
悲&欢浪女
悲&欢浪女 2020-12-18 09:50

I\'m having a hard time with getting the value of my dynamically appended textboxes. I\'m using the $.each function to iterate all of the textboxes according to

6条回答
  •  南方客
    南方客 (楼主)
    2020-12-18 10:23

    Added a new class to all text boxes 'student_grde'

    
          
          
    
    
          
    

    And jquery to

    $('#save_grade_button').click(function (){
        $.each($('.student_grde'), function(i, item) {
            var grade =  $('#student_grde_G['+i+']').val();
            alert(grade);
        });
    });
    

提交回复
热议问题