可能重複:
Detect all changes to a <input type=「text」> (immediately) using JQueryjQuery的模糊替代
我有一個用戶輸入數據和在onBlur事件它AJAX請求來驗證他們已經輸入的數據的文本框。如果驗證,則按鈕變爲啓用。然而,用戶會感到困惑,他們必須在頁面上的某個地方標出或點擊該按鈕才能啓用。
是否有替代事件或方法來使用我正在使用的代碼?
$('.serial').live('blur', function() {
//Do AJAX to validate
//If ok enable button
$('#button').attr("disabled", "");
});
所以很多重複,這麼短的時間... ;-)這可能是最好的:http://stackoverflow.com/questions/1948332/detect-all-changes-to-a-input-type -text-immediately-using-jquery但也有:http://stackoverflow.com/questions/1539279/using-jquery-how-do-you-detect-if-the-value-of-a-text-input -has-changed-while-t | http://stackoverflow.com/questions/1481152/jquery-how-to-detect-a-textboxs-content-has-changed | http://stackoverflow.com/questions/6153047/jquery-detect-changed-input-text-box –