我正在做一個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