• 原始AJAX代码


    AJAX("POST"
        ,
    "/shared/ete2/submitschool.asp"
        ,
    "xml="+encodeURIComponent(xml.xml),
        
    function(msg){
            
    var f=window.document.frames["bgPage"];
            f.document.write(
    "<body>"+msg.xml.toString()+"</body>");
            healthCheckNew();
        });


    function AJAX(type,url,data,callback){
        
    var request = false;
        
    try {
            request 
    = new XMLHttpRequest();
        } 
    catch (trymicrosoft) {
         
    try {
            request 
    = new ActiveXObject("Msxml2.XMLHTTP");
         } 
    catch (othermicrosoft) {
           
    try {
                request 
    = new ActiveXObject("Microsoft.XMLHTTP");
           } 
    catch (failed) {
                request 
    = false;
           }  
         }
        }
        
    if (!request)    return;
        
        request.open(type, url, 
    true);
        request.setRequestHeader(
    "CONTENT-TYPE","application/x-www-form-urlencoded");
        request.setRequestHeader(
    "Content-Length",data.length);

        request.onreadystatechange 
    = function(){
            
    if(request.readyState == 4) {
                
    if(request.status == 200) {
                    callback(request.responseXML);
                } 
             }
        };
        request.send(data);
        
    }
  • 相关阅读:
    PHP对象的遍历
    PHP对象的复制
    PHP面向对象之类的自动加载
    PHP面向对象之接口
    PHP面向对象之重载
    PHP面向对象之抽象类,抽象方法
    PHP面向对象之final关键字
    PHP面向对象之重写
    使用python操作word
    vc++使用cookie登录网站
  • 原文地址:https://www.cnblogs.com/200325074/p/1961136.html
Copyright © 2020-2023  润新知