ajax三步骤
来源:互联网 发布:点点客小店有软件吗 编辑:程序博客网 时间:2024/04/29 13:11
/**
* Created by Administrator on 2016/12/19.
*/
//type:类型:GET OR POST
//address:路径; 返回值为获取的json对象
function getJson(type,address,Good){
var http;
if(window.XMLHttpRequest){
http = new XMLHttpRequest();
}else{
http = new ActiveXObject("Microsoft.XMLHTTP");
}
//处理数据
http.onreadystatechange = function (){
if(http.readyState == 4 && http.status == 200){
var JsonStr = http.responseText;
var json = JSON.parse(JsonStr);
//处理数据
Good(json);
}
};
//发送请求
http.open(type,address,true);
http.setRequestHeader("content-type","application/x-www-form-urlencoded");
http.send();
}
* Created by Administrator on 2016/12/19.
*/
//type:类型:GET OR POST
//address:路径; 返回值为获取的json对象
function getJson(type,address,Good){
var http;
if(window.XMLHttpRequest){
http = new XMLHttpRequest();
}else{
http = new ActiveXObject("Microsoft.XMLHTTP");
}
//处理数据
http.onreadystatechange = function (){
if(http.readyState == 4 && http.status == 200){
var JsonStr = http.responseText;
var json = JSON.parse(JsonStr);
//处理数据
Good(json);
}
};
//发送请求
http.open(type,address,true);
http.setRequestHeader("content-type","application/x-www-form-urlencoded");
http.send();
}
0 0
- ajax三步骤
- ajax步骤
- 三步骤
- ajax开发步骤
- Ajax 基本操作步骤
- 初学ajax使用步骤
- jQuery简化Ajax步骤
- Ajax.dll步骤
- Ajax链接服务器步骤
- 构建Ajax应用步骤
- Ajax基本步骤
- Ajax通信步骤
- ajax的步骤
- 开发Ajax程序步骤
- ajax开发步骤
- ajax实现步骤
- Ajax编程步骤
- Ajax之实现步骤
- Java 服务端入门和进阶指南
- 连续第九十二天
- linux下安装mysql(centos6.5)-yum安装方式
- 多线程小说下载
- Pascal's Triangle II
- ajax三步骤
- ubuntu 配置nfs server
- CI框架开发后,部署到服务器时报404
- 转 SQL Server 查询处理中的各个阶段(SQL执行顺序)
- BZOJ2599: [IOI2011]Race
- jquery animate 显示隐藏
- .Net命名空间和程序集
- 最优分解问题
- Activity之间传递参数(四)