zoukankan      html  css  js  c++  java
  • 原始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);
        
    }
  • 相关阅读:
    Mysql InnoDB引擎下 事务的隔离级别
    Spring 两大核心 IOC 和 AOP
    java 冒泡排序
    MyBatis 传入List集合作为条件查询数据
    fastfusion运行
    数据集
    工具学习
    三维重建
    Scrivener破解
    博客园设置
  • 原文地址:https://www.cnblogs.com/200325074/p/1961136.html
Copyright © 2011-2022 走看看