ajax

1 先引入js文件
<script type="text/javascript" src="${contextPath}/webpoint/plugins/jquery/jqAajax.js"></script>

2 然后
  var params={};
   params['params.key'] = 'querySMTipCount';
   params['params.userId'] =userId;

   var ajax = new jqAjax();
   ajax.setCallback(function (json){
     var tempHTML;
   json = json[0];
      //window.alert(" fanhui: "+json.TOTAL);
   total =json.TOTAL;
   //window.alert( "staffName"   
   });
   ajax.jqueryAjax({params:params,fileds:{},root:'querySMTipCount'});

你可能感兴趣的:(Ajax)