1、json字符串拼接:
json格式:var aa={"name":"john",“age”:“26”};
处理程序ashx--查询结果dataset:
jsontext = "{" + "\"title\":\"" + ds.Tables[0].Rows[0]["title"] + "\", \"content\":\"" + ds.Tables[0].Rows[0]["content"] + "\"}";
2、调用:
$.getJSON("tools/Handler1.ashx", { proname: "E4", relname: "" },
function (json)
{
var t =
eval(json);
alert(t.title);
});