我正在做一个jQuery.post
到一个PHP文件,并且该文件返回的是我的值。
问题是:为什么$(this)
dosent在回调函数中工作? 任何警报传递的东西来展示,使用$(this)
,回报就是我null
$(".class").live("focusout", function(){
jQuery.post("phpfile.php",
{
someValue: someValue
},
function(data)
{
// why the $(this) dosent work in the callback ?
}
)
});
谢谢,工作的perfetc。 – 2011-06-10 13:33:37
最好使用['.ajax()'](http://api.jquery.com/jQuery.ajax/)而不是'.post()',以便设置'context'选项。 – Wiseguy 2011-06-10 13:36:00
@Wiseguy:提示,请看看。 – 2011-06-10 13:37:00