我想向 jQuery 函数传递一个常规函数,而不是通常的匿名函数,但我不确定如何做到这一点。
而不是这个:
function setVersion(feature) {
$.post("some.php", { abc:"abc" },
function(data){
// do something here
}, "json");
}
我想这样做:
function foo(data){
// do something here
}
function setVersion(feature) {
$.post("some.php", { abc:"abc" }, foo, "json");
}
谢谢你。