javascript - How do I select a value from a dropdownlist case insensitive? -


i trying find "cat" in dropdown values of dropdown ["cat","rat","mat"] result not able find text , dont have id "cat" find id. suggestion?

edit: lowercase() change "cat" cat right?? dropdown has "cat"

try compare values lowercase :

if(myvalue.tolowercase() === ddl[i].tolowercase()) {     //... } 

Popular posts from this blog

Php - Delimiter must not be alphanumeric or backslash -

c# - How to change the "Applies To" field under folder auditing options programatically (.NET) -

c++ - Ambiguity when using boost::assign::list_of to construct a std::vector -