I want to restrict the user if they select the language which is already selected by displaying alert msg using JQuery. Is there any event which fires before the change event.
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
What I did in this kind of situation was:
In Change event, compare the existing values with newly selected one. if value is there, I alert the message and reset the combo box to default selection.
回答2:
When you add the new combo box, simply remove the previous combo boxes' values from the new one, then you don't have to test for existing values or call an alert.
The user just has the remaining values to choose from. It's much easier.
回答3:
To answer your question, focusin will fire before the change event.