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

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

1. 请问如何监听htmlbutton元件ontouchstart,ontouchend等事件 [ 100%]

请问如何监听htmlbutton元件ontouchstart,ontouchend等事件 如题,我可以如下为button加上onclick的监听事件。this.btn_CloseWebiFrame = laya.utils.Browser.window.document.createElement('button'); this.btn_CloseWebiFrame.onclick = () => { console.log("onclick"); };  oncon...

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

2. 请问HTMLDivElement支持button吗? [ 93%]

请问HTMLDivElement支持button吗? 只要支持点击事件就可以了,有这样的使用方式吗? 2017-03-13 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到相关结果 已邀请: 与内容相关的链接 提交 2 个回复 cuixueying 赞同来自: HtmlDivElement本身就是...

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

3. 做复制文本到粘贴板时遇到的奇怪问题 [ 93%]

...textarea,然后写js执行浏览器的execCommand,用了一个htmlbutton去执行那段js,可以正常复制文本;但是我用layabox的ui去取到那个htmlbutton然后发click事件,复制文本就会失败。这个问题在layabox的模拟器里面不会出现,而在chrome和ed...

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

4. 无法触发浏览器文件上传框 [ 92%]

...览器文件上传框 // 程序入口 class GameMain { private btn: Laya.Button; private skin: string = 'images/button.png'; constructor() { Laya.init(200, 300); Laya.loader.load(this.skin, Laya.Handler.create(this, () => { this.btn = this.createBtn(this.skin); this.btn.on(Laya.Event.CLICK, this,...

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

5. list单个中的单条的button怎么添加点击事件 [ 90%]

list单个中的单条的button怎么添加点击事件 2018-06-11 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到相关结果 已邀请: 与内容相关的链接 提交 1 个回复 Laya_Aaron 赞同来自: Life | Growing up http://layaair.ldc.layabox.com/api/index.html?category=...

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

6. 怎么样实现点击左边容器中的button在右边的容器中显示一个页面 [ 84%]

怎么样实现点击左边容器中的button在右边的容器中显示一个页面 2018-06-11 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到相关结果 已邀请: 与内容相关的链接 提交 3 个回复 Laya_Aaron 赞同来自: 这个就是代码逻辑了,不在服务...

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

7. 鼠标交互-滑动 [ 83%]

...= 200; //触发swipe的拖动距离 var TOGGLE_DIST = TrackLength / 2; var buttonPosition, beginPosition, endPosition; var button; (function() { // 不支持WebGL时自动切换至Canvas Laya.init(Browser.clientWidth, Browser.clientHeight, WebGL); Laya.stage.alignV = Stage.ALIGN_MIDDLE; Laya.stage.a...

来源: Laya_示例 发布时间: 20240929

8. 鼠标交互-滑动 [ 83%]

...= 200; //触发swipe的拖动距离 let TOGGLE_DIST = TrackLength / 2; let buttonPosition, beginPosition, endPosition; let button; class Interaction_Swipe { constructor() { const Browser = Laya.Browser, WebGL = Laya.WebGL, Stage = Laya.Stage, Stat = Laya.Stat, Handler = Laya.Handler; // 不支持Web...

来源: Laya2.0_示例 发布时间: 20240929

9. hit unhit 对button控件不起作用吗? [ 82%]

hit unhit 对button控件不起作用吗? 这样放进去btn都不能点击了 2018-11-28 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到相关结果 已邀请: 与内容相关的链接 提交 1 个回复 Nevermore 赞同来自: 帖子不能删除么? 2018-12-11 0 0 分享 ...

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

10. 代码添加Button添加皮肤出错 [ 81%]

代码添加Button添加皮肤出错 附件 : --> 2018-12-12 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到相关结果 已邀请: 与内容相关的链接 提交 1 个回复 hj 赞同来自: 不问苍生 设置btn.skin = "res/......"; 2018-12-12 1 1 分享 微博 QZONE 微...

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