jQuery多个事件触发相同的功能 - jQuery multiple events to trigger the same function

问题:

Is there a way to have keyup , keypress , blur , and change events call the same function in one line or do I have to do them separately? 有没有办法让keyupkeypressblurchange事件在一行中调用相同的函数,仍是必须单独执行? 数据库

The problem I have is that I need to validate some data with a db lookup and would like to make sure validation is not missed in any case, whether it is typed or pasted into the box. 我遇到的问题是我须要使用数据库查找验证一些数据,而且但愿确保在任何状况下都不会错过验证,不管是键入仍是粘贴到框中。 函数


解决方案:

参考一: https://stackoom.com/question/AdEP/jQuery多个事件触发相同的功能
参考二: https://oldbug.net/q/AdEP/jQuery-multiple-events-to-trigger-the-same-function
相关文章
相关标签/搜索