<!
DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"
>
< html >
< head >
< title ></ title >
< meta name ="GENERATOR" content ="Microsoft Visual Studio .NET 7.1" >
< meta name =ProgId content =VisualStudio.HTML >
< meta name =Originator content ="Microsoft Visual Studio .NET 7.1" >
< script src =http://www.cnblogs.com/js/jquery-1.4.4.min.js ></ script >
</ head >
< body >
< div id ="count" ></ div >
< script >
/*
$.ajax({
type: "POST",
url: "json.aspx",
data: "id=1",
success: function(msg){
msg = eval(msg);
alert(msg);
}
});
*/
function f(msg)
{
alert(msg.arg1[ 0 ].v);
}
// 可以
f({ arg1: [ {v: " 1 " } ]});
// 可以
f({ arg1: [ { " v " : " 1 " } ]});
</ script >
</ body >
</ html >
/* $.ajax({ type: "POST", url: "json.aspx", data: "id=1", success: function(msg){ msg = eval(msg); alert(msg); } }); */ function f(msg) { alert(msg.arg1[0].v); } //可以 f({ arg1: [ {v:"1"} ]}); //可以 f({ arg1: [ {"v":"1"} ]}); // ]]>
< html >
< head >
< title ></ title >
< meta name ="GENERATOR" content ="Microsoft Visual Studio .NET 7.1" >
< meta name =ProgId content =VisualStudio.HTML >
< meta name =Originator content ="Microsoft Visual Studio .NET 7.1" >
< script src =http://www.cnblogs.com/js/jquery-1.4.4.min.js ></ script >
</ head >
< body >
< div id ="count" ></ div >
< script >
/*
$.ajax({
type: "POST",
url: "json.aspx",
data: "id=1",
success: function(msg){
msg = eval(msg);
alert(msg);
}
});
*/
function f(msg)
{
alert(msg.arg1[ 0 ].v);
}
// 可以
f({ arg1: [ {v: " 1 " } ]});
// 可以
f({ arg1: [ { " v " : " 1 " } ]});
</ script >
</ body >
</ html >
/* $.ajax({ type: "POST", url: "json.aspx", data: "id=1", success: function(msg){ msg = eval(msg); alert(msg); } }); */ function f(msg) { alert(msg.arg1[0].v); } //可以 f({ arg1: [ {v:"1"} ]}); //可以 f({ arg1: [ {"v":"1"} ]}); // ]]>