As per some answers on a nearby question, «HTTP GET request in JavaScript?», you might use XMLHttpRequest
, since, according to the docs, the POST
method is supported, too.
http://www.w3.org/TR/XMLHttpRequest/
https://developer.mozilla.org/en-US/docs/DOM/XMLHttpRequest
A sample code from the above w3.org document:
function log(message) {
var client = new XMLHttpRequest();
client.open("POST", "/log");
client.setRequestHeader("Content-Type", "text/plain;charset=UTF-8");
client.send(message);
}
However, it would seem like in order for it to work with POST
requests to domains unrelated to yours (where instead of "/log"
, a complete http
or https
URL is specified), the Cross-Origin Resource Sharing may have to be supported and enabled on the target server, as per https://developer.mozilla.org/en-US/docs/HTTP/Access_control_CORS#Simple_requests.
So, it seems like, at least through XMLHttpRequest
, you cannot make form submissions through POST
requests (in fact, looks like even GET
requests won't fly, either).