本文共 1331 字,大约阅读时间需要 4 分钟。
jQuery keyup is one of the keyboard event methods. Other jQuery keyboard event methods are keydown()
and keypress()
.
jQuery keyup是键盘事件方法之一。 其他jQuery键盘事件方法是keydown()
和keypress()
。
jQuery keyup method triggers when you release the pressed key. You can attach functions to execute when this event occurs.
当您释放按下的键时,jQuery keyup方法将触发。 您可以附加函数以在发生此事件时执行。
Following example demonstrates the use of jQuery keyup method.
以下示例演示了jQuery keyup方法的用法。
jquery-keyup.html
jquery-keyup.html
jQuery keyup event example jQuery keyup example
Enter anything: Type something above, after key up background color will change to Red.Click on Reset button to try again.
In above example, when the key is up, keyup() method is triggered which in turn executes the function that changes the background colour to red.
在上面的示例中,当按下键时,将触发keyup()方法,该方法又执行将背景色更改为红色的功能。
Below screencast shows above jQuery keyup example in action.
下面的截屏视频显示了上面的jQuery键盘操作示例。
翻译自:
转载地址:http://yclzd.baihongyu.com/