Update data in a table with jquery and ajax

后端 未结 5 2066
灰色年华
灰色年华 2020-12-10 22:53

I am trying to update a table according to ajax respond. My update should be insert as the first row inside in my table. With my coding this is ha

5条回答
  •  爱一瞬间的悲伤
    2020-12-10 23:49

    There is a jQuery method called after() and it can do the thing you want...

    $('#manage_user table > tbody:first').append(data); 
    

    can be changed to

    $('#manage_user tr:first').after('first'); which inserts the result as first row of the table... Check the demo here

提交回复
热议问题