在下拉菜单中禁用所选值 [英] Disable the selected value in drop down menu
本文介绍了在下拉菜单中禁用所选值的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
解决方案
以下是您正在寻找的三个工作示例:
使用jQuery:
使用纯JavaScript:
编码与< select>
标签一致:
I have this drop down menu.It stores month, Jan-Dec. User can choose any value of the drop down menu but just one time only. Meaning, lets say previously he choose Jan, the next time if he logged in/ enter new record, he cannot choose Jan anymore or maybe remove the month permanently. Once he select the month, it will be store in session to other page. So, if you guys have any idea,suggestions, or plans, dont hesitate to leave ur answer here. Thank you.
解决方案
Here are three working examples of what you're looking for:
Using jQuery:
With plain JavaScript:
Coded inline with the <select>
tag:
这篇关于在下拉菜单中禁用所选值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文