大约有 23 项符合查询结果, 库内数据总量为 30,900 项。 (搜索耗时: 0.0030 秒)
xhr的on和once什么区别,官网例子 Laya.init(1136, 640); var xhr:HttpRequest = new HttpRequest(); xhr.http.timeout = 10000;//设置超时时间; xhr.once(Event.COMPLETE,this,completeHandler); xhr.once(Event.ERROR,this,errorHandler); xhr.on(Event.PROGRESS,this,processHandler); 2017-10-17 ...
来源: Laya_社区 发布时间: 20171017
...tonLogin = function (){ console.log ('按了登录按钮') var xhr = new Laya.HttpRequest(); xhr.http.timeout = 10000;//设置超时时间; xhr.once(Event.COMPLETE,this,completeHandler); xhr.once(Event.ERROR,this,errorHandler); xhr.once(Event.PROGRESS,this,processHandler); var sendData = {acco...
来源: Laya_社区 发布时间: 20180824
...输出。是不是我哪里用得不对?代码如下 //初始化引擎 Laya.init(1136,640); var xhr = new Laya.HttpRequest(); xhr.http.timeout = 10000;//设置超时时间; xhr.once(Event.COMPLETE,this,completeHandler); xhr.once(Event.ERROR,this,errorHandler); xhr.on(Event.PROGRESS,this,processH...
来源: Laya_社区 发布时间: 20180827
...lication/json"); 还是说用参考代码里的HttpRequest() var xhr = new Laya.HttpRequest(); xhr.http.setRequestHeader('Content-Type','application/x-www-form-urlencoded'); xhr.once(Laya.Event.COMPLETE, this, this.completeHandler, [url, loader]); xhr.once(Laya.Event.ERROR, this, this.errorHandler);...
来源: Laya_社区 发布时间: 20180704
排坑:Laya.HttpRequest()无效 写了一个测试程序,简单获取网页源码并打印到控制台。然而,什么也获取不到 下面是代码 console.log("开始测试"); var xhr = new Laya.HttpRequest(); xhr.http.timeout = 10000;//设置超时时间; xhr.once(Event.COMPLETE, this, co...
来源: Laya_社区 发布时间: 20180208
Laya.HttpRequest 没有调用回调方法? //初始化引擎 Laya.init(1136,640); var xhr = new Laya.HttpRequest(); xhr.http.timeout = 10000;//设置超时时间; xhr.once(Event.COMPLETE,this,completeHandler); xhr.once(Event.ERROR,this,errorHandler); xhr.on(Event.PROGRESS,this,processHandler); ...
来源: Laya_社区 发布时间: 20180830
... 关于如何加载,这里我们先从原生开始,然后再过渡到LayaAir引擎,这样开发者可以理解其中的含义。以二进制流的方式加载,这里我们采用XMLHttpRequest二进制流的方式来加载。关于XMLHttpRequest的操作我们这里不再陈述,会放到单...
来源: Laya2.0_文档 发布时间: 20210715
...= (function (_super) { function JiHuo() { JiHuo.super(this); var xhr = new Laya.HttpRequest(); xhr.http.timeout = 10000;//设置超时时间; xhr.once(Event.COMPLETE, this, completeHandler); xhr.once(Event.ERROR, this, errorHandler); xhr.on(Event.PROGRESS, this, processHandler); xhr.send("https://...
来源: Laya_社区 发布时间: 20180419
... 关于如何加载,这里我们先从原生开始,然后在过渡到Layaair引擎,这样开发者可以理解其中的含义。以二进制流的方式加载,这里我们采用XMLHttpRequest二进制流的方式来加载。关于XMLHttpRequest的操作我们这里不再陈述,会放到单...
来源: Laya2.0_文档 发布时间: 20210714
... 关于如何加载,这里我们先从原生开始,然后在过渡到Layaair引擎,这样开发者可以理解其中的含义。以二进制流的方式加载,这里我们采用XMLHttpRequest二进制流的方式来加载。关于XMLHttpRequest的操作我们这里不再陈述,会放到单...
来源: Laya2.0_文档 发布时间: 20210714