.keypress( handler )返回值: jQuery弃用版本: 3.3
描述: 绑定一个事件处理程序到 "keypress" 事件,或者在元素上触发该事件。
-
添加版本: 1.0.keypress( handler )
-
handler每次触发事件时要执行的函数。
-
-
添加版本: 1.4.3.keypress( [eventData ], handler )
-
eventData类型: 任何类型包含将传递给事件处理程序的数据的对象。
-
handler每次触发事件时要执行的函数。
-
-
添加版本: 1.0.keypress()
- 此签名不接受任何参数。
此 API 已弃用。
不要使用 .keypress( handler )
或 .keypress( eventData, handler )
,请分别使用 .on( "keypress", handler )
或 .on( "keypress", eventData, handler )
。
不要使用 .keypress()
,请使用 .trigger( "keypress" )
。