$.ajax({
type:"POST",
url:"Venue.aspx?act=init",
dataType:"html",
success:function(result){ //function1()
f1();
f2();
}
failure:function (result) {
alert('Failed');
},
}
function2();
$.ajax({
type:"POST",
url:"Venue.aspx?act=init",
dataType:"html",
async: false,
success:function(result){ //function1()
f1();
f2();
}
failure:function (result) {
alert('Failed');
},
}
function2();
var returnValue = null;
xmlhttp = createXmlHttp();
xmlhttp.onreadystatechange = function() {
if(xmlhttp.readyState == 4 && xmlhttp.status == 200) {
if (xmlhttp.responseText == "true") {
returnValue = "true";
}
else {
returnValue = "false";
}
}
};
xmlhttp.open("Post",url,true); //异步传输
xmlhttp.setRequestHeader("If-Modified-Since","0"); //不缓存Ajax
xmlhttp.send(sendStr);
return returnValue;
xmlHttpReq.open("GET",url,true);//异步方式
xmlHttpReq.onreadystatechange = showResult; //showResult是回调函数名
xmlHttpReq.send(null);
function showResult(){
if(xmlHttpReq.readyState == 4){
if(xmlHttpReq.status == 200){
******
}
}
}
xmlHttpReq.open("GET",url,false);//同步方式
xmlHttpReq.send(null);
showResult(); //showResult虽然是回调函数名但是具体用法不一样~
function showResult(){
//if(xmlHttpReq.readyState == 4){ 这里就不用了,直接dosomething吧~
//if(xmlHttpReq.status == 200){
******//dosomething
//}
//}
}
xmlhttp.open("Post",url,true);
机械节能产品生产企业官网模板...
大气智能家居家具装修装饰类企业通用网站模板...
礼品公司网站模板
宽屏简约大气婚纱摄影影楼模板...
蓝白WAP手机综合医院类整站源码(独立后台)...苏ICP备2024110244号-2 苏公网安备32050702011978号 增值电信业务经营许可证编号:苏B2-20251499 | Copyright 2018 - 2025 源码网商城 (www.ymwmall.com) 版权所有