Jaber Ahmad
asked on
Display values select
Good morning all !
I can't find a way to hide a value from a select except in this way:
Can you help me please ?
cordially
I can't find a way to hide a value from a select except in this way:
SEL_Paiement.options[1].style.display = "block";
SEL_Paiement.options[2].style.display = "none";
SEL_Paiement.options[3].style.display = "block";
SEL_Paiement.options[4].style.display = "block";
SEL_Paiement.options[5].style.display = "block";
SEL_Paiement.options[6].style.display = "block";
SEL_Paiement.options[7].style.display = "block";
I wish I could do the same thing but with values and not options[1], like (I say a big mistake):SEL_Paiement.value = "Hello".style.display = "block";
Can you help me please ?
cordially
ASKER CERTIFIED SOLUTION
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
Some browsers will allow
Open in new window
and then haveOpen in new window
in cssbut the most cross browser safe version is to remove them and add them when needed:
Open in new window