Javascript: Select option based on its contents
Posted
by Zac Altman
on Stack Overflow
See other posts from Stack Overflow
or by Zac Altman
Published on 2010-05-30T00:53:57Z
Indexed on
2010/05/30
1:02 UTC
Read the original article
Hit count: 325
Basically this, but in pure javascript: http://stackoverflow.com/questions/2346257/how-to-get-value-of-select-tag-based-on-content-of-select-tag-using-nokogiri
So I have a select list with a lot of countries/states, and I want to be able to select one based on what is between the tags.
Argentina
(I know i could use the value, but each one is a random mesh of numbers, so i would have to collect each individual one - not economical...)
© Stack Overflow or respective owner