$.getJSON(
"test.php",
function(data){
... code should be here?
}
)
data
包含此代码:jQuery的JSON解码
{
"name": "Mary",
"surname": "Carey"
}
我要创建这些变量:
theName = name from json;
theSurname = surname from json;
,这是什么任务,真正的语法?
谢谢。
`theName = data.name; theSurname = data.surname;` – jball 2011-02-02 17:16:45