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

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

11. 怎么使用http请求 [ 85%]

...setRequestHeader('content-type', 'application/x-www-form-urlencoded'); xhr.send("value=" + baseStr); 这个怎么改成laya的http请求 2018-08-07 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到相关结果 已邀请: 与内容相关的链接 提交 1 个回复 Laya_Aaron 赞同...

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

12. HttpRequest感觉没有发成功 [ 85%]

....ERROR,this,errorHandler); xhr.on(Event.PROGRESS,this,processHandler); xhr.send("https://www.baidu.com","","get","text"); function processHandler(data){ console.log(data); console.log("processHandler"); } function errorHandler(data){ console.log("errorHandler"); } function completeHandler(e){ consol...

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

13. 排坑:Laya.HttpRequest()无效 [ 82%]

...OR, this, errorHandler); xhr.on(Event.PROGRESS, this, processHandler); xhr.send("http://www.baidu.com", "", "get", "text"); function processHandler(data) { console.log(data); } function errorHandler(data) { console.log(data); } function completeHandler(e) { console.log(e); }下面是运行结果,...

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

14. Native 如何使用ttf? [ 82%]

...ror = function (e) { alert('>>>download ttf error :' + e); }; xhr.send(null); //这里以html5标准canvas接口为例 function onDrawFrame() { Laya.Browser.context.save(); Laya.Browser.context.font = "Arial"; Laya.Browser.context.fillStyle = "#00ff00"; Laya.Browser.context.restore(); } 然...

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

15. Laya.HttpRequest 没有调用回调方法? [ 82%]

....ERROR,this,errorHandler); xhr.on(Event.PROGRESS,this,processHandler); xhr.send("https://www.baidu.com/","","get","text"); function processHandler(data){ console.log(data); console.log("1111"); } function errorHandler(data){ console.log("2222"); } function completeHandler(e){ console.log("3333"); } ...

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

16. 官方的示例贴上来,怎么没反映啊 [ 81%]

...OR, this, errorHandler); xhr.on(Event.PROGRESS, this, processHandler); xhr.send("https://api.weixin.qq.com/cgi- ... ot%3B, "", "get", "text"); function processHandler(data) { console.log(data); } function errorHandler(data) { alert(2); } function completeHandler(e) { alert(1); } } Laya.class(JiHuo, ...

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

17. 请问怎么把arraybuffer作为图片显示出来 [ 78%]

...completeHandler); xhr.once(Laya.Event.ERROR, this, this.errorHandler); xhr.send("https://ask.layabox.com/static ... ot%3B, "", "get", "arraybuffer"); private completeHandler(data: ArrayBuffer) { //请问怎么把这个arraybuffer作为图片显示出来 } 2018-10-10 添加评论 免费帖 --> 分享...

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

18. 如何post发送json数据中包含&&特殊字符,怎么办? [ 78%]

...a":"123&&456", "b":"ccc"}; str="paramA="+JSON.stringify(tj); //xhr.send("http:xxx.xxx.com","a=xxxx&b=xxx","post","text"); xhr.send("http:xxx.xxx.com",str,"post","text"); 服务端解析的时候,paramA参数的值为:{"a":"123 剩下的被解析为另一个post变量了。 试了字...

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

19. ios读取文件 [ 77%]

...己决定url     loadUrl(url); } xhr.onerror=()=>{     //TODO } xhr.send(); 问题是动态url的话,会导致打包资源失效,因为资源是与url绑定的。 2017-07-04 0 1 分享 微博 QZONE 微信 为什么被折叠? 0 个回复被折叠 要回复问题请先登录 发起人 xz352...

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

20. web和微信端没有问题,打包成apk后 httprequest报Request failed Status:404 text:undefined [ 75%]

...r); this.xhr.on(Laya.Event.PROGRESS, this, this.ProgressHandler); this.xhr.send(Global.WebHost+this.currentRequest.url, this.currentRequest.data, "post", "text", ["Access-Control-Allow-Origin","*", "Access-Control-Allow-Headers","X-Requested-With", "Access-Control-Allow-Methods","GET,POST"]); 2020-0...

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