Ajax应用2

$.ajax({
	type: "POST", 
	url: "jkhtAjaxAction.do?operFlag=query",
	data:"dypmc=" +dypmc,
	 dataType:"josn",
	success: function(json){	
		// eval转换成对象 var
		json_obj=eval( "("+json+")");	
                var value = json_obj[0].mj;
                var value2 = json_obj[0].dyplx;
					}});



response.setContentType("text/html");
response.setHeader("Cathe-Control", "no-cache");
response.setHeader("Pragma", "no-cache");
List<Object> returnlist = new ArrayList<Object>();
JSONArray jsonArray = new JSONArray();
ZdjkhtdyqkbDAO zdhtzymxDAO = new ZdjkhtdyqkbDAO();
returnlist = zdhtzymxDAO.getDyzd(dypid);
jsonArray = JSONArray.fromObject(returnlist);
				response.getWriter().println(jsonArray.toString());

你可能感兴趣的:(java,html,Ajax,json,cache)