How to detect a textbox's content has changed

后端 未结 15 2031
猫巷女王i
猫巷女王i 2020-11-22 16:10

I want to detect whenever a textbox\'s content has changed. I can use the keyup method, but that will also detect keystrokes which do not generate letters, like the arrow ke

15条回答
  •  挽巷
    挽巷 (楼主)
    2020-11-22 16:31

    do you consider using change event ?

    $("#myTextBox").change(function() { alert("content changed"); });
    

提交回复
热议问题