I have an HTML table filled with a number of rows.
How can I remove all the rows from the table?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Use .remove()
If you want to keep the data for future use even after removing it then you can use .detach()
If the rows are children of the table then you can use child selector instead of descendant selector, like