储存this

$('#zhetenga').click(function(){ 
//this是被点击的#zhetenga 
var that = this; 
$('.zhetenga').each(function(){ 
//this是.zhetenga循环中当前的对象 
//that仍然是刚才被点击的#zhetenga 
}); 
}); 

posted @ 2017-05-03 15:31  Esther_Cheung  阅读(144)  评论(0编辑  收藏  举报