$("ul li").each(function(){var self = $(this);//为了不让this搞混淆所以设置一个变量,改变量为当前liself.click(function(){//....});});