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

WBOY
Release: 2016-06-02 11:28:09
Original
1262 people have browsed it

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>
Copy after login

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

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!