Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

js extract options from select

// @florinrelea
const selectElementId = 'example'
const htmlOptionsCollections = document.getElementById(selectElementId).options
const options = Array.from(htmlOptionsCollections).map(el=> el.textContent)
console.log(options)
 
PREVIOUS NEXT
Tagged: #js #extract #options #select
ADD COMMENT
Topic
Name
6+3 =