【发布时间】:2011-04-05 13:44:15
【问题描述】:
我正在使用 jquery 从表单中发布数据(通过 jquery 表单插件 - http://jquery.malsup.com/form/)
我能够收到的唯一回调(在“成功:”部分中)是使用成功的“html”:function(html) { ... }。
能否仅根据 html 输出区分成功响应?
基本上我想要一些可以做到这一点的东西..
成功:function(html, some_other_variable) {
如果 (some_other_variable == 1) {
//做某事
} 否则 {
//做点别的事情
}
}
我一直在这里阅读:http://api.jquery.com/jQuery.post/ .. 但没有运气
提前致谢, 菲尔
【问题讨论】:
标签: jquery ajax forms jquery-plugins post