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

大约有 13 项符合查询结果, 库内数据总量为 30,723 项。 (搜索耗时: 0.0046 秒)

1. LayaAir和原生DOM交互(TypeScript-2D进阶篇(TS)-扩展模块) [ 100%]

...); img.src = url; img.style.position ="absolute"; img.style.zIndex = 99999 document.body.appendChild(img); ``` 怎么运行上边这段代码呢?打开谷歌浏览器,随便打开一个空白网页,F12,把上面的代码粘贴到控制台,然后回车,就能看到上面截图的效果。...

来源: Laya2.0_文档 发布时间: 20210715

2. LayaAir和原生DOM交互(ActionScript-2D进阶篇(AS3)-扩展模块) [ 98%]

...); img.src = url; img.style.position ="absolute"; img.style.zIndex = 99999 document.body.appendChild(img); ``` 怎么运行呢?打开谷歌浏览器,随便打开你一个空白网页,F12,把上面的代码粘贴到控制台,然后回车,就看到上面截图的效果。或者新建个htm...

来源: Laya2.0_文档 发布时间: 20210715

3. AS3与JS混合编码(ActionScript-2D进阶篇(AS3)-扩展模块) [ 82%]

...emo() { //初始化引擎 Laya.init(0, 0); //Browser.window后的$(Browser.document)为第三方库jquery的方法。 Browser.window.$(Browser.document).ready(function():void{ Browser.window.alert("jquery调用成功"); }); } } } ``` 编译运行后,我们可以看到弹窗成功,表明已经调...

来源: Laya2.0_文档 发布时间: 20210715

4. JSONP跨域读取数据(TypeScript-LayaAir基础篇(TS)-数据与通信) [ 79%]

...,100); var script:any = Laya.Browser.createElement("script"); Laya.Browser.document.body.appendChild(script); script.src = "http://localhost:9090/?a=1"; } public static onComplete():void{ console.log("JSONP执行到这里"); } } new LayaSample(); ``` ```java var script:any = Laya.Browser.createEleme...

来源: Laya2.0_文档 发布时间: 20210715

5. JSONP跨域读取数据(ActionScript-LayaAir基础篇(AS3)-数据与通信) [ 78%]

...aya.init(100,100); var script:* = Browser.createElement("script"); Browser.document.body.appendChild(script); script.src = "http://localhost:9090/?a=1"; } public static function onComplete():void{ trace("JSONP执行到这里"); } } } ``` ```java var script:* = Browser.createElement("script");//这...

来源: Laya2.0_文档 发布时间: 20210714

6. HttpRequest详解(TypeScript-LayaAir基础篇(TS)-数据与通信) [ 77%]

...型由 `responseType 来指定,` 可以是 `ArrayBuffer` ,`Blob`, [`Document`](https://developer.mozilla.org/zh-CN/docs/Web/API/Document), JavaScript 对象 (即 “json”), 或者是字符串。如果请求未完成或失败,则该值为 `null` | | responseText | DOMString | 此次请...

来源: Laya2.0_文档 发布时间: 20210715

7. HttpRequest详解(ActionScript-LayaAir基础篇(AS3)-数据与通信) [ 76%]

...型由 `responseType 来指定,` 可以是 `ArrayBuffer` ,`Blob`, [`Document`](https://developer.mozilla.org/zh-CN/docs/Web/API/Document), JavaScript 对象 (即 "json"), 或者是字符串。如果请求未完成或失败,则该值为 `null` | | responseText | DOMString | 此次请求...

来源: Laya2.0_文档 发布时间: 20210715

8. HttpRequest详解(JavaScript-LayaAir基础篇(JS)-数据与通信) [ 69%]

...型由 `responseType 来指定,` 可以是 `ArrayBuffer` ,`Blob`, [`Document`](https://developer.mozilla.org/zh-CN/docs/Web/API/Document), JavaScript 对象 (即 “json”), 或者是字符串。如果请求未完成或失败,则该值为 `null` | | responseText | DOMString | 此次请...

来源: Laya2.0_文档 发布时间: 20210714

9. 二进制图片(TypeScript-2D进阶篇(TS)-游戏加载策略) [ 67%]

...) { var blob = new Blob([this.response], { type: "image/png" }); var img = document.createElement("img"); img.onload = function (e) { window.URL.revokeObjectURL(img.src); // 清除释放; }; img.src = window.URL.createObjectURL(blob); document.body.appendChild(img); } } xhr.send(); ``` 上面这个...

来源: Laya2.0_文档 发布时间: 20210714

10. 二进制图片(ActionScript-2D进阶篇(AS3)-游戏加载策略) [ 67%]

...) { var blob = new Blob([this.response], { type: "image/png" }); var img = document.createElement("img"); img.onload = function (e) { window.URL.revokeObjectURL(img.src); // 清除释放; }; img.src = window.URL.createObjectURL(blob); document.body.appendChild(img); } } xhr.send(); ``` ​ 上面这...

来源: Laya2.0_文档 发布时间: 20210714