jQuery 'input' event

后端 未结 8 626
执念已碎
执念已碎 2020-11-22 08:53

I\'ve never heard of an event in jQuery called input till I saw this jsfiddle.

Do you know why it\'s working? Is it an alias for keyup or s

8条回答
  •  悲&欢浪女
    2020-11-22 09:11

    jQuery has the following signature for the .on() method: .on( events [, selector ] [, data ], handler )

    Events could be anyone of the ones listed on this reference:

    https://developer.mozilla.org/en-US/docs/Web/Events

    Though, they are not all supported by every browser.

    Mozilla states the following about the input event:

    The DOM input event is fired synchronously when the value of an or element is changed. Additionally, it fires on contenteditable editors when its contents are changed.

提交回复
热议问题