mootools_使用MooTools收听删除键

mootools

I saw an interesting ticket hit the MooTools Lighthouse system recently. A user reported that they could not use the following code snippet to listen for the delete key:

最近,我看到一张有趣的票打在MooTools Lighthouse系统上。 一个用户报告说他们不能使用以下代码片段侦听删除键:


var isdel = Event.Keys.delete;


While that generally works, it does not work for the delete key because "delete" is a reserved word. Instead, you must listen for the delete key with this code snippet:

虽然通常可以使用,但对于删除键不起作用,因为“删除”是保留字。 相反,您必须使用以下代码片段监听删除键:


var isdel = Event.Keys['delete'];


Very interesting. As flexible as Moo's language is, you can't get around the reserved words!

很有意思。 尽管Moo的语言非常灵活,但您无法绕过保留字!

翻译自: https://davidwalsh.name/listen-delete-key-mootools

mootools

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值