function GetSCAPEList()
{
var type;
var a=document.getElementById("jingdian").innerText
$.ajax({
type: "get",
dataType: "json",
url:SetUrlRefresh("../service/GetSCAPE.jsp"),
data:"type="+ encodeURIComponent(encodeURIComponent(a)), //这里传值进去
error: function(XmlHttpRequest, textStatus, errorThrown) {
// alert("刷新 ~频率有点快 亲~~~~");
},
success: function(d) {
switch (d.result) {
case '0':
alert(d.returnval);
break;
case '1':
$("#Home_SCAPEList").setTemplateElement("SCAPEList", null, { filter_data: false });
$("#Home_SCAPEList").processTemplate(d);
break;
default:
alert(d.result);
break;
}
}
});
}
//然后跳转到后台 这里用jsp来 演示
<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@page import="java.util.*"%>
<%@page import="com.journey.frameword.dao.*"%>
<%@page import="com.journey.frameword.dao.DaoImpl"%>
<% Dao dao = new DaoImpl(); %>
<%
String type =request.getParameter("type").trim(); //这里是 显示成一个 十六进制的 字符串
type=java.net.URLDecoder.decode(type,"UTF-8"); //这两句 转码 utf-8 成功
List list = dao.executeQueryForList("SELECT mddcontent FROM mafengwo_table_1 WHERE mddname = '"+type+"' limit 0,1");
java.util.Map map0 = (java.util.Map)list.get(0);
System.out.println(map0.get("mddcontent"));
%>
{result:"1",table:[
{id :"0",minPic:"<%=map0.get("mddcontent")%>"}
]}