1

私は以下のjsコードを持っています:

xmlhttp = GetXmlHttpObject();
if (xmlhttp != null) {
    var url = "/support/residential/outage/serviceOutage?cbrnum=" + cbrnum + "&btn=" + btn + "&outagetkt=" + outagetkt;
    xmlhttp.onreadystatechange = function () {
        if (xmlhttp.readyState == 4 && xmlhttp.status == 200) {
            document.getElementById("thankyoucontent").innerHTML = xmlhttp.responseText;
        }
    }
    xmlhttp.open("POST", url, true);
    xmlhttp.send(null);
}

これは、クエリ文字列で特定のパラメーターを渡すことにより、サーブレットを呼び出します。今私の質問は、すべてのパラメーターを単一のオブジェクトにバインドし、そのオブジェクトをクエリ文字列で単独で送信し、サーブレットでオブジェクトを使用してパラメーター値を取得できますか? 出来ますか?

4

1 に答える 1