为了账号安全,请及时绑定邮箱和手机立即绑定

jquery $(this)的疑问

jquery $(this)的疑问

LEATH 2018-11-25 00:00:25
jquery $(this)的疑问
查看完整描述

1 回答

?
qq_遁去的一_1

TA贡献1725条经验 获得超8个赞

$(function(){
$('button').click(function(){
//$(this)表示当前对象,在这里指的是button按钮
$(this).closest('tr').remove();
//或者:
$(this).parent().parent().remove();
//或者:
$(this).parents('tr').remove();
})
})

查看完整回答
反对 回复 2018-12-08
  • 1 回答
  • 0 关注
  • 609 浏览

添加回答

举报

0/150
提交
取消
微信客服

购课补贴
联系客服咨询优惠详情

帮助反馈 APP下载

慕课网APP
您的移动学习伙伴

公众号

扫描二维码
关注慕课网微信公众号