Monday, June 3, 2024
 Popular · Latest · Hot · Upcoming
160
rated 0 times [  161] [ 1]  / answers: 1 / hits: 18799  / 12 Years ago, mon, december 24, 2012, 12:00:00

I want to prevent a select from being changed when a specific condition is satisfied without disabling the select element.


More From » html

 Answers
20

Try this: JSBin Demo



<select id=mySelect data-value= onfocus=this.setAttribute('data-value', this.value); 
onchange=this.value = this.getAttribute('data-value');>

[#81247] Saturday, December 22, 2012, 12 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
willieelisham

Total Points: 201
Total Questions: 108
Total Answers: 106

Location: Zambia
Member since Sat, Oct 31, 2020
4 Years ago
willieelisham questions
Wed, Apr 14, 21, 00:00, 3 Years ago
Wed, Mar 31, 21, 00:00, 3 Years ago
Sun, Oct 11, 20, 00:00, 4 Years ago
Sat, May 9, 20, 00:00, 4 Years ago
;