Jquery AJAX回调函数 [英] Jquery AJAX callback function

查看:75
本文介绍了Jquery AJAX回调函数的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,



我开发一个邮件发送应用程序,因为我能够使用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 the Ajax call, show the message and on Success or Error CallBack function, just make it blank.


这篇关于Jquery AJAX回调函数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆