Ajax POST请求

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Ajax POST请求相关的知识,希望对你有一定的参考价值。

  1. var xmlhttp = new XMLHttpRequest();
  2. xmlhttp.open('POST', 'http://whatever.com/myscript.php', true);
  3. xmlhttp.setRequestHeader('Content-type', 'application/x-www-form-urlencoded');
  4. xmlhttp.onreadystatechange = function() {
  5. };
  6. xmlhttp.send('param=5');

以上是关于Ajax POST请求的主要内容,如果未能解决你的问题,请参考以下文章