【发布时间】:2011-08-24 08:22:18
【问题描述】:
这是我的代码:
var jqxhr = $.post("mypage.php", {url:pageurl}, function() {
alert("fetching...");
})
.success(function() { alert("fetch complete!"); })
.error(function() { alert("error!"); })
.complete(function() { alert("complete"); });
// Set another completion function for the request above
jqxhr.complete(function(){ alert("second complete"); });
我收到警报(“Fetching...”)对话框,但其余代码未完成。我收到错误:错误:$.post("sec_fetch_report.php", function () {alert("fetching...");}).success is not a function
我想也许我可能缺少 jquery 库,但我有另一个调用 $.post 的函数,它运行得很好。是否有我在某处遗漏的语法错误或什么? 谢谢
【问题讨论】:
标签: javascript jquery ajax post