Kri*_*a K 24
Ext.Ajax.request({
url: 'foo.php', // where you wanna post
success: passFn, // function called on success
failure: failFn,
params: { foo: 'bar' } // your json data
});
Run Code Online (Sandbox Code Playgroud)
小智 20
以下将标识为" POST "请求
Ext.Ajax.request({
url: 'foo.php', // where you wanna post
success: passFn, // function called on success
failure: failFn,
jsonData: { foo: 'bar' } // your json data
});
Run Code Online (Sandbox Code Playgroud)
以下将标识为' GET '请求
Ext.Ajax.request({
url: 'foo.php', // where you wanna make the get request
success: passFn, // function called on success
failure: failFn,
params: { foo: 'bar' } // your json data
});
Run Code Online (Sandbox Code Playgroud)
只是为了加上我的两分钱:
//
//Encoding to JSON:
//
var myObj = {
visit: "http://thecodeabode.blogspot.com/"
};
var jsonStr = Ext.encode(myObj);
//
// Decoding from JSON
//
var myObjCopy = Ext.decode(jsonStr);
document.location.href = myObj.visit;
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
49751 次 |
| 最近记录: |