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
相關文章
相關標籤/搜索