JavaScriptを使ってPOST送信する方法

まだ良くわかってない

function doPost(form, action, name){
    name = name || "send";//defualt setting.
    var submitType = document.createElement("input");
    submitType.setAttribute("name", name);
    submitType.setAttribute("type", "hidden");
    submitType.setAttribute("value", "1");//判定用の値
    form.appendChild(submitType);
    form.action = action;
    form.method = "post";
    form.submit();
    return false;
}


ネタ元