option.style.display = “none” not working in safari [duplicate]
问题 This question already has answers here : How can I hide select options with JavaScript? (Cross browser) (15 answers) Closed 6 years ago . This is the example I'm working on: http://jsfiddle.net/4suwY/5/ HTML: <select id="asd"> <option>hello</option> <option>I'M THE CHOSEN ONE</option> <option>asd</option> <option>wer</option> <option>qwe</option> </select> JS: var sel = document.getElementById("asd"); var optnz = sel.getElementsByTagName("option")[1]; sel.value = optnz.value; optnz.style