| 
 | 
 
我要发送ajax请求,传递xml到后台,我用的js方法是: 
function SendHttp(sAspFile, sSend) { 
    var str11 = ""; 
    if (navigator.onLine == false) { 
        return "你现在处于脱机状态,请联机后再试!"; 
    } 
    var xmlhttp = new ActiveXObject("Microsoft.XMLHTTP"); 
 
    xmlhttp.Open("POST", sAspFile, false); 
    try { 
        xmlhttp.Send("<root>" + sSend + "</root>"); 
    } 
    catch (exception) { 
        alert("服务器忙!"); 
    } 
 
    try { 
        str11 = xmlhttp.responseText; //responseText 
    } 
    catch (exception) { 
        if (exception.description == '系统错误: -1072896748。') { 
            str11 = ""; 
        } 
 
    } 
 
    return str11; 
} 
 
 
可是这个方法不能兼容除IE之外的浏览器,有没有其他方法 
 |   
 
 
 
 |