Jquery AJAX回调函数 [英] Jquery AJAX callback function
问题描述
大家好,
我开发一个邮件发送应用程序,因为我能够使用Jquery ajax成功发送邮件。但我想要做的是我写所有的文件,如TO,Subjct和Body,当我点击发送邮件按钮我想删除所有文本字段,并希望保留像邮件发送之类的消息然后成功发送后想要显示邮件发送成功。我能够在错误回调函数中显示错误消息(如果有)和成功回复函数中的成功消息。但我无法做消息发送,何时添加此文本?我的意思是回调函数?
Hi all,
I/m developing a mail sending application in that i'm able to send mail successfully using Jquery ajax. But what i want to do is i write all the fileds like TO, Subjct and Body, when i click on send mail button i want to remove all text fields and wants to keep a message like "Mail is Sending" then after successful sending wants to display "Mail send Successfully". I'm able to display Error message in error callback function if any and Success Message in Success callback function. But i'm not able to do "Message is sending", when to add this text ? i mean the callback function?
推荐答案
在Ajax
调用之前,显示消息并在上成功或错误 CallBack功能,只需将其设为空白
。
Just before theAjax
call, show the message and on Success or Error CallBack function, just make itblank
.
这篇关于Jquery AJAX回调函数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!