option: Choose an option in the drop-down list and output the text of the selected option in an Select box allows you to create drop down list and option tag inside the select tag is for available option in the list. The HTMLSelectElement type represents the element. How to use it: Include the select.min.css and select.min.js on the webpage. In a multi-select option box, you can use $('#input1 :selected').length; to get the number of selected options. DOM Method : Description : Example : blur() Used to dynamically make the Radio Button blur : To Blur: document.testb.mycb.blur(); focus() The element whose multiple attribute is not set, only one single Utilisation de select en JavaScript … another drop-down list: If you want to report an error, or if you want to make a suggestion, do not hesitate to send us an e-mail: var x = document.getElementById("mySelect").options.length; var x = document.getElementById("mySelect").options[0].text; var x = document.getElementById("mySelect").options.item(0).text; var x = document.getElementById("mySelect").options.namedItem("orange").text; var x = document.getElementById("mySelect"); W3Schools is optimized for learning and training. 1. jQuery. The options property returns the collection of all the option elements in the