[removed] How to iterate through list of objects in Model

前端 未结 4 966
清酒与你
清酒与你 2021-02-14 10:48

so I need to get to fetch the names of students in a list of student object that is in a view\'s model then send them to the server via $.post, the latter I have figured it out

4条回答
  •  深忆病人
    2021-02-14 11:32

    you can use $.each of jquery to iterate the result.

    $.each(yourModel,function(){//do with loop});
    

    and for the error. you made mistake in declaration of loop variable

    for (var i = 0; i < length; i++) 
    

提交回复
热议问题