Jquery, Clear / Empty all contents of tbody element?

前端 未结 6 1073
萌比男神i
萌比男神i 2021-01-30 12:06

I thought this would be rather simple but it seems the empty method is not working to clear out a tbody that I have. I would appreciate if anyone knows a proper way to do this,

6条回答
  •  执笔经年
    2021-01-30 13:03

            
                 ...
                 ...
                

    use this command to clear the body of that table: $("#table_id tbody").empty()

    I use jquery to load the table content dynamically, and use this command to clear the body when doing the refreshing.

    hope this helps you.

提交回复
热议问题