Below is code for select option and generate using php from database and i try to add selected=\"selected\" to value=\"4\" using jQuery or any javascri
localStorage.getItem("Select1") will return Malaysia and $(e).val() will return 1,2...5 in each loop. So your condition will never be true. Instead use