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()) { //... }