jQuery Ajax从Controller / Model获取函数

时间:2013-07-15 23:09:32

标签: jquery cakephp-1.3

我正在尝试从模型中的函数“获取”结果“function drop_1($ var)” 我看了一下语法: $获得(URL,数据,功能(数据,状态,XHR)的dataType) 不确定我的网址是什么,或者是否有更好的方式从模型“获取”?

<script type="text/javascript">
$(document).ready(function() {
    $('#wait_1').hide();
    $('#drop_1').change(function(){
      $('#wait_1').show();
      $('#result_1').hide();
      $.get("url", { 
        func: "drop_1",
        drop_var: $('#drop_1').val()
      }, function(response){
        $('#result_1').fadeOut();
        setTimeout("finishAjax('result_1', '"+escape(response)+"')", 400);
      });
        return false;
    });
});
</script>

0 个答案:

没有答案
相关问题