• 首页
  • 动态
  • 案例
  • 引擎社区
  • API
  • 文档
  • 示例
  • 引擎下载

大约有 68 项符合查询结果, 库内数据总量为 31,671 项。 (搜索耗时: 0.0043 秒)

21. iOS wkWebView [ 76%]

...答下啊!     private connect(): void { console.log("connect...."); this.hr = new Laya.HttpRequest(); this.hr.once(Laya.Event.PROGRESS, this, this.onHttpRequestProgress); this.hr.once(Laya.Event.COMPLETE, this, this.onHttpRequestComplete); this.hr.once(Laya.Event.ERROR, this, this.onHttpRequest...

来源: Laya_社区 发布时间: 20201023

22. http 请求 once 的 回调参数,如何传递和接收? [ 75%]

...象。 请求发送: var hr = new HttpRequest(); hr.once(Event.COMPLETE, this, http.success,[1,2,3]); hr.send("http://localhost:8082/hu_get",{}, "post","json",null);   回调方法: success:function (e,args) {     console.log(e); //此行可以得到响应内容     console.log(args);  //...

来源: Laya_社区 发布时间: 20180304

23. HttpRequest在网页上和APP上表现不一致 [ 74%]

...let url = "http://10.1.1.123:9090/pgame/s ... 3B%3B Laya.timer.loop(30000, this, ()=>{     let hr = new Laya.HttpRequest();     hr.http.timeout = 3000;     hr.http.ontimeout = function(){console.log("http timeout test: timeout")};     hr.once(Laya.Event.COMPLETE, this, ()=>{console.log...

来源: Laya_社区 发布时间: 20171016

24. 分享:简单聊天室 [ 73%]

...</span><br/>"; // 添加超链接跳转 my_html.on(Event.LINK,this,onLink); // 点击btn1 send_btn.on(Event.CLICK,this,onSendClick); // 点击btn2 send_btn1.on(Event.CLICK,this,onSendClick1); // enter键发送默认字体或输入框内字体 Laya.stage.on(Event.KEY_DOWN,this,onKeyDown);...

来源: Laya_社区 发布时间: 20170107

25. WebSocket通信 · LayaAir3.3 · 引擎文档 · LAYABOX [ 72%]

...ROR:连接出错时触发。 示例代码: // 注册事件监听示例 this.socket.on(Laya.Event.OPEN, this, this.onSocketOpen); this.socket.on(Laya.Event.MESSAGE, this, this.onMessageReceived); this.socket.on(Laya.Event.CLOSE, this, this.onSocketClose); this.socket.on(Laya.Event.ERROR, this, th...

来源: Laya3.0_文档 发布时间: 20251010

26. 解决跨域相关! [ 72%]

...就连www.baidu.com,这个加头后,为啥还连不上, 看代码-> this.hr=new HttpRequest(); this.hr.once(Laya.Event.PROGRESS, this, this.onHttpRequestProgress); this.hr.once(Laya.Event.COMPLETE, this, this.onHttpRequestComplete); this.hr.once(Laya.Event.ERROR, this, this.onHttpRequestError...

来源: Laya_社区 发布时间: 20151028

27. 回调函数... [ 72%]

回调函数... constructor(){ Laya.loader.load(this.skins, Handler.create(this, this.onUIAssetsLoaded)); } aaa() { } function onUIAssetsLoaded( this.aaa();//为什么回调函数不能调用,undefined } 2017-06-26 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到相关结果 已...

来源: Laya_社区 发布时间: 20170626

28. XMLRequest在layaNative下请求崩溃,请求官方协助! [ 72%]

...,请求官方协助!  public post(url: string, data: any, callback: (this: void, data: JSON) => void): void {         let hr = new Laya.HttpRequest();         hr.once(Laya.Event.COMPLETE, this, (e: any): void => {             callback(JSON.parse(hr.data));         });  ...

来源: Laya_社区 发布时间: 20190829

29. Laya.URL.basePath加载不到网络资源 [ 71%]

...: Laya.Loader.IMAGE}, ];   Laya.loader.load(resArray, Laya.Handler.create(this, this.onLoaded2));   Laya.URL.basePath = "https://piggy.q1.com"; var resArray = [ { url: "res/atlas/images.atlas", type : Laya.Loader.ATLAS}, // { url: "res/swf/flash.json", type: Laya.Loader.JSON}, // { url: "images/ba...

来源: Laya_社区 发布时间: 20180531

30. 排坑:Laya.HttpRequest()无效 [ 71%]

... xhr.http.timeout = 10000;//设置超时时间; xhr.once(Event.COMPLETE, this, completeHandler); xhr.once(Event.ERROR, this, errorHandler); xhr.on(Event.PROGRESS, this, processHandler); xhr.send("http://www.baidu.com", "", "get", "text"); function processHandler(data) { console.log(data); } functi...

来源: Laya_社区 发布时间: 20180208