一个工具类
xhr1 = new Ajax('data.js', {evalScript: true}); xhr2 = new Ajax('abstraction.js', {evalScript: true}); xhr3 = new Ajax('template.js', {evalScript: true}); var group = new Group(xhr1, xhr2, xhr3); group.addEvent('onComplete', function(){ alert('All Scripts loaded'); //将在下面三个请求动作完成以后触发 }); xhr1.request(); xhr2.request(); xhr3.request();
向组中加入一个事件
type | 事件名(如:‘onComplete’) |
fn | 事件监听函数 |
Documentation by Aaron Newton & Mootools Developers, generated by NaturalDocs and tidy, and GeSHi
文档中文翻译:zarknight 勘误Email:zarknight@gmail.com asp之家