5

私はこのコードを持っています:

function newXMLHttpRequest() {
    var xmlHttp;
    try {
        xmlHttp = new ActiveXObject("Msxml2.XMLHTTP");
    } catch (e) {
        try {
            xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");
        } catch (f) {
            xmlHttp = new XMLHttpRequest();
        }
    }
    return xmlHttp;
}
var xmlHttp = newXMLHttpRequest();
xmlHttp.open("POST", url, true);
xmlHttp.onreadystatechange = function() {
    // this I have xmlHttp.status = 12019        
    alert("readyState = " + xmlHttp.readyState + "\nstatus = " + xmlHttp.status);
}
xmlHttp.send('same data');

無効な証明書を使用してサーバーにリクエストを送信すると、ステータス コード 12019 のエラーが発生します。

ソリューションはクロスブラウザ (IE、FF、Chrome) である必要があります

4

1 に答える 1