jquery 删除table行
< table >
      < tbody >
          < tr >
              < td > 这行原来就有 </ td >
              < td >< button class = " del " > 删除 </ button ></ td >
          </ tr >
          < tr >
              < td > 这行原来就有 </ td >
              < td >< button class = " del " > 删除 </ button ></ td >
          </ tr >
      </ tbody >
</ table >
用jquery动态的给按钮加click事件,能删除行!
哥哥们, 怎么实现??
------解决方案--------------------$("table button").bind('click',function(){
//this指向当前button
});
------解决方案--------------------JScript code
$(function () {
            $(".del").bind('click', function () {
                var $tr = $(this).parents("tr");
                $tr.remove();
                return false;
            });
        });
------解决方案--------------------
------解决方案--------------------
$("table .del").click(function(){
    $(this).parents("tr").remove();
});