J* * encode和decode函数是专门用来对JSON数据进行编码和解码的函数。
* Ext.encode()对应的解码方法为Ext.decode()。
*
* * * =" + encodeURIComponent(Ext.encode(obj))
* *。
eg: function successFn(response,options){
var obj = Ext.decode(response.responseText);// alert(obj.username);
}
function failureFn(response,options){
alert('请求失败');
}
Ext.Ajax.request({
,
success:successFn,
failure:failure,
params:{dsname:'INSERT'}
});
通过该对象的responseText或responseXML属性获得由服务器端返回的数据信息。
*
* * eg:
* var array = [1,2,3,4];
* var sum = 0;
* Ext.each(array,function(item){
* sum += item;
* });
* alert(sum);
* * *直接在HTML中为元素设置提示信息。
<input type="button" value="标签型提示信息"
ext:qtitle="提示的标题"
ext:qtip="<b><i>提示的内容</i></b><p>下一行内容</p>"/>