我有一个加载的gif图像,我显示直到任务完成,但它在ajax调用运行时冻结。如何才能使加载gif不冻结?
var dataString = 'subject='+ subject + '&message='+ message;
$.ajax({
type: "POST",
url: "message",
data: dataString,
cache: false,
beforeSend: function()
{
$("#errormsg").html('<div>Please wait <img src="image/loader.gif"/></div>');
},
success: function(response)
{
$('#errormsg').html(response);
}
});