我有这个功能
function procData(a) {
$('#loading' + a).show();
$.post("ajax.php?talk=" + a, {
slot: $('#slot' + a).val()
}, function (response) {
$('#talkdesc' + a).fadeOut();
setTimeout("finishAjax('talkdesc', a, '" + escape(response) + "')", 400);
});
}
function finishAjax(id, a, response) {
$('#' + id + a).html(unescape(response));
$('#' + id + a).fadeIn();
}
在procData()中,我试图将变量'a'传递给finishAjax,但似乎没有任何效果。除了这个之外,它适用于所有被调用的区域。有什么想法吗?
答案 0 :(得分:1)
setTimeout(function () {
finishAjax('talkdesc', a, escape(response));
}, 400);