日期:2014-05-16 浏览次数:20449 次
Ext.Ajax.request({
    url:'xxx.do',
    method : 'post',// 请求的方式 GET OR POST
    params :  {id : id}, //  传递的参数
    scope:this,      // 修改函数的this对象
//   成功时候的回调函数
    success : function(response, options)
    {
   				
    },
//   失败时候的回调函数
    failure : function(response, options)
   {
    	
   }
});	
	@Override
protected void doPost(HttpServletRequest request, HttpServletResponse response)
			throws ServletException, IOException
{
       JSONObject responseJSON = new JSONObject();
       //....................
        response.getWriter().write(responseJSON.toString());
	response.getWriter().flush();
}
success : function(response, options)
{
    	var text = Ext.decode(response.responseText);
 
//       通过text.  来获得对应的值
	if(text.success)
	{
	}