大约有 68 项符合查询结果, 库内数据总量为 30,903 项。 (搜索耗时: 0.0041 秒)
...http.timeout = 10000;//设置超时时间; xhr.once(Laya.Event.COMPLETE, this, this.completeHandler); xhr.once(Laya.Event.ERROR, this, this.errorHandler); xhr.on(Laya.Event.PROGRESS, this, this.processHandler); xhr.send("res/data.data", "", "get", "text"); console.log("aaaa"); } private processHan...
来源: Laya2.0_文档 发布时间: 20210715
...; xhr.http.timeout = 10000;//设置超时时间; xhr.once(Event.COMPLETE,this,completeHandler); xhr.once(Event.ERROR,this,errorHandler); xhr.on(Event.PROGRESS,this,processHandler); xhr.send("res/data.data","","get","text"); function processHandler(data){ console.log(data); } function errorHandler(...
来源: Laya2.0_文档 发布时间: 20210714
...; xhr.http.timeout = 10000;//设置超时时间; xhr.once(Event.COMPLETE,this,completeHandler); xhr.once(Event.ERROR,this,errorHandler); xhr.on(Event.PROGRESS,this,processHandler); xhr.send("res/data.data","","get","text"); } private function processHandler(data:Object):void { trace(data); } priva...
来源: Laya2.0_文档 发布时间: 20210715
...a.TextArea; private text: Laya.Label = new Laya.Label(); onAwake(): void { this.initUI(); this.connect(); } /** * 初始化UI */ private initUI(): void { this.showLogger(); this.text.text = "请查看源码和调试信息,了解如何使用"; this.text.color = "#FFFFFF"; this.text.font = "Impact";...
来源: Laya3.0_文档 发布时间: 20250214
...象所封装的原生 XMLHttpRequest 引用。 */ get http(): any { return this._http; } 通过 ._http 属性可以获得XMLHttpRequest。XMLHttpRequest 中文可以解释为可扩展超文本传输请求。它为客户端提供了在客户端和服务器之间传输数据的功能。它提供了一...
来源: Laya3.0_文档 发布时间: 20250104
...new Laya.HttpRequest(); hr.http.timeout = 5000; hr.on(Laya.Event.PROGRESS, this, this.onHttpRequestProgress); hr.once(Laya.Event.COMPLETE, this, (response)=>{ UIFactory.closeWaitBar(); this.onHttpRequestComplete(response); if(handleOk){ handleOk(response); } }); hr.once(Laya.Event.ERROR, this, (e...
来源: Laya_社区 发布时间: 20190308
...加headers则正常 示例代码 var headers = [ 'C-Sign', sign ]; // this.caller = caller; this.callbackHandler = callback; // this.errcallback = errcallback; //this.http.once(Laya.Event.PROGRESS, this, this.onHttpRequestProgress); this.http.once(Laya.Event.COMPLETE, this, this.onHttpRequestCom...
来源: Laya_社区 发布时间: 20180916
... = "http://thirdqq.qlogo.cn/g%3Fb% ... 3B%3B xhr.once(Laya.Event.COMPLETE, this, this.completeHandler, [url, 1]); xhr.once(Laya.Event.ERROR, this, this.errorHandler); xhr.send(url, "", "get", "arraybuffer"); } } GameMain.prototype.completeHandler = function (URL, id, data) { // private completeHandl...
来源: Laya_社区 发布时间: 20180629
...; xhr.http.timeout = 10000;//设置超时时间; xhr.once(Event.COMPLETE,this,completeHandler); xhr.once(Event.ERROR,this,errorHandler); xhr.once(Event.PROGRESS,this,processHandler); var sendData = {account:"aaa",password:"bbb"} xhr.send("http://xxx/login", JSON.stringify(sendData), "post", "jso...
来源: Laya_社区 发布时间: 20180824
...})(); function connect() { hr = new HttpRequest(); hr.once(Event.PROGRESS, this, onHttpRequestProgress); hr.once(Event.COMPLETE, this, onHttpRequestComplete); hr.once(Event.ERROR, this, onHttpRequestError); hr.send('http://xkxz.zhonghao.huo.inner.layabox.com/api/getData', 'name=myname&psword=xxx', '...
来源: Laya_示例 发布时间: 20250223