摘要: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.o 阅读全文
posted @ 2017-11-30 15:24 alice-you 阅读(3714) 评论(0) 推荐(0) 编辑
摘要: 解决ajax处理服务器端返回结果responseText中是JSON的数据。 第一,json格式的文件内容如下: { "city":"ShangHai", "telephone":"123456789" } 第二,服务器端返回的json数据就是上述的内容在responseText中,现在要取出来,方 阅读全文
posted @ 2017-11-30 14:20 alice-you 阅读(16027) 评论(1) 推荐(2) 编辑
摘要: varjsonData='{"data1":"Hello,","data2":"world!"}' 调用方法jsonData.data1,jsonData.data2 jsonData=[ {"name":"LiLei","age":19,"sex":"male"}, {"name":"HanMei 阅读全文
posted @ 2017-11-30 14:12 alice-you 阅读(711) 评论(0) 推荐(0) 编辑
摘要: $.ajax({ type: "post", url: url, dataType:'html', success: function(data) { }, complete: function(XMLHttpRequest, textStatus) { }, error: function(){} 阅读全文
posted @ 2017-11-30 11:23 alice-you 阅读(30784) 评论(0) 推荐(1) 编辑