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的语言非常灵活,但您无法绕过保留字!
mootools