Home  >  Article  >  Backend Development  >  thinkphp-ajax如何请求控制器啊啊

thinkphp-ajax如何请求控制器啊啊

WBOY
WBOYOriginal
2016-06-02 11:28:091261browse

thinkphpajaxphp函数

<code>var xmlhttp;xmlhttp=new XMLHttpRequest();xmlhttp.open("GET","MemberController.class.php/ajax",true);xmlhttp.send(null);xmlhttp.onreadystatechange=function()  {  if (xmlhttp.readyState==4 && xmlhttp.status==200)    {         alert(this.responseText);    }  else      {alert('sb'); }  }</code>

为何这个一直输出sb呢,我是请求被页面的ajax的方法返回值,一直不行

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn