现在的位置: 首页 > 综合 > 正文

jquery返回json类型数据集合简单实现ajax返回多个数据

2012年10月27日 ⁄ 综合 ⁄ 共 254字 ⁄ 字号 评论关闭

 temp = "\r\n{\"conversion\":{\r\n\"decimal\":12}}";

返回值

JQery的ajax使用

$.ajax({

url: 'Ajax.aspx?type=xml',

type: 'GET',

dataType: 'json',

timeout: 1000,

error: function(){

alert('Error loading XML document');

},

success: function(data){
alert(data['conversion']['decimal']);
}

});

抱歉!评论已关闭.