`
lijuanabc
  • 浏览: 120283 次
社区版块
存档分类
最新评论

json例子

 
阅读更多

前台:

function loadStireInfo(crruentArticleId)
{
$.ajax({
type:"post",
url:"util/getStoreInfo.aspx",
data:{articleId:crruentArticleId},
beforeSend:function(){ },
success:function(data)
{
var storeInfo = (new Function("return " + data))();

alert(storeInfo.topicImagePath);

alert(storeInfo.storeSummary);

alert( storeInfo.storeNum);
}
});
}

后台:

string resultStr = "{\"storeName\":\"" + storeName + "\",\"storeSummary\":\"" + storeSummary + "\",\"storeNum\":\"" + storeNum + "\",\"topicImagePath\":\"" + topicImagePath + "\"}";

Response.Write(resultStr);

Response.Flush();
Response.End();

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics