网上的下列方法都试过了,还是不行。请大虾指点
$('table tbody').empty();
$("table tbody").html("");
------解决方案--------------------
- HTML code
<!DOCTYPE HTML> <html> <head> <meta charset="gb2312" /> <title></title> <style> </style> <script src="http://code.jquery.com/jquery-latest.js"></script> </head> <body> <table> <tbody> <tr> <td>123</td> </tr> </tbody> </table> <script> $('table tbody').empty(); </script> </body> </html>
------解决方案--------------------
$(table tr).empty();试过没?