大约有 15 项符合查询结果, 库内数据总量为 30,903 项。 (搜索耗时: 0.0027 秒)
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
...= (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
...必须用这种方式显示图片 之前有在网上看到 let url = Laya.Browser.window.URL.createObjectURL(data); 这样把arraybuffer弄成一个url 但是这种方式估计在微信小游戏或其他平台不行的 求大神帮忙 let xhr = new Laya.HttpRequest(); xhr.once(Laya.Eve...
来源: Laya_社区 发布时间: 20181010
...容相关的链接 提交 2 个回复 金风 赞同来自: this.xhr.once(Laya.Event.COMPLETE, this, this.CompleteHandler); this.xhr.once(Laya.Event.ERROR, this, this.ErrorHandler); this.xhr.on(Laya.Event.PROGRESS, this, this.ProgressHandler); this.xhr.send(Global.WebHost+this.currentRequest.url, thi...
来源: Laya_社区 发布时间: 20200629
...一玩处取排行榜时返回的用户头像URL 代码如下 var WebGL = Laya.WebGL; // 程序入口 var GameMain = /** @class */ (function () { function GameMain() { //初始化引擎 Laya.init(1136, 640); for (var i = 0; i < 4; i++) { var sp = new Laya.Sprite(); var xhr = new Laya.HttpRequest(...
来源: Laya_社区 发布时间: 20180629