首页 新闻 会员 周边

this指向window

0
悬赏园豆:15 [已关闭问题] 关闭于 2016-11-14 17:18

$('.table>tbody>tr').mouseout(function(){
var index=$(this).index();
setTimeout(function(){
console.log(index);
console.log($(this));
$(this).parents('.table').siblings('.check-btn').children('p').eq(index).children('input').addClass('hiddens');
console.log($(this).parents('.table').siblings('.check-btn').children('p').eq(index).children('input'));
},2000);

setTimeout打印的this是window

这是为什么呢?求大神指教

改吧的主页 改吧 | 初学一级 | 园豆:104
提问于:2016-11-14 17:09
< >
分享
清除回答草稿
   您需要登录以后才能回答,未注册用户请先注册