日期:2014-05-16 浏览次数:20990 次
  function getData(fun){
  $.ajax(
  type: "get",
  datatype: "json",
  cache: false,
   url: encodeURI("/ashx/User/userajax.ashx?action=4&uid=" + obj + "&type=" + types),
  success: function (response) {}
);
success: function (response) {
   //你要在getData里传一个直接运行的匿名函数?
   getData(function(response){
            }
   );
}
------解决方案--------------------
我现在怎么实现
getData(function(response){//这个地方怎么能获取到值});
success: function (response) {
 fun(response) //fun是我传递进来的回调函数,怎么实现
}
????不理解
------解决方案--------------------
糊涂,看不懂,没表达清楚
------解决方案--------------------