Disable the selected value in drop down menu [clos

2019-09-21 14:21发布

问题:

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.

回答1:

Here are three working examples of what you're looking for:

Using jQuery:

http://jsfiddle.net/wLNZX/

With plain JavaScript:

http://jsfiddle.net/wLNZX/1/

Coded inline with the <select> tag:

http://jsfiddle.net/wLNZX/2/