日期:2014-05-17 浏览次数:20464 次
string msg="{ msginfo:[";
msg += "{";
msg += "msgs:'" + "完成"+"',";
msg += "flag:'" + "true" + "',";
msg += "thumb:'" + tpath+"',";
msg += "path:'" + imgpath + "'";
msg += "}";
$.ajax({
type: "POST",
dateType: "json",
url: "xxxx.aspx",
data: "path=" + path,
success: function (data) {
var jsonData;
jsonData = eval(data);
$.each(jsonData.msginfo, function (idx, item) {
}
}
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default8.aspx.cs" Inherits="Default8" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>无标题页</title>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.js" type="text/javascript"></script>
<script type="text/javascript">
$(function(){
var path="path"
$.ajax({
type: "POST",
dateType: "json",
url: "Default8.aspx",
data: "path=" + path,
success: function (jsonData) {
jsonData = $.parseJSON(jsonData);
$.each(jsonData.msginfo, function (idx, item) {
alert(this.msgs);
});
}
});
$.getJSON("Default8.aspx","path=" + path,function (jsonData) {
$.each(jsonData.msginfo, function (idx, item) {
alert(this.msgs);
});