求教关于ajax的有关问题

WBOY
Release: 2016-06-13 13:40:39
Original
810 people have browsed it

求教关于ajax的问题
我有个程序调用ajax
var   ajax   =   new   sack();
ajax.reset();
ajax.setVar( "category ", "send ");
ajax.setVar( "xiaoxi ",$( 'xiaoxi ').value);
ajax.setVar( "test1 ",test1);
ajax.setVar( "test2 ",test2);
ajax.requestFile   =   "test.php ";
ajax.onCompletion   =   function()
{
//alert(this.response);
buildTBody(test1,this.response);
}
ajax.runAJAX();
ajax=null;
为什么我请求是同时发送的,但是test.php是顺序执行的,回应是一个一个顺序返回的?

------解决方案--------------------
send里设为true
------解决方案--------------------
你先去看看XMLHTTP的方法和属性就会明白了。
------解决方案--------------------
也就是说你open 的时候设置为true就是异步,反之则是同步.

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!