LoginSignup
8
8

More than 5 years have passed since last update.

JavaScriptでPOSTを送るコード

Posted at
POSTの送信
function sendPost(text,to) {
    httpObj = new XMLHttpRequest();
    if (httpObj) {
        httpObj.open("POST","send.php",true);
        httpObj.setRequestHeader("content-type","application/x-www-form-urlencoded");
        httpObj.send("text="+text+"&to="+to);
    }
}
8
8
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
8
8