Search
 
SCRIPT & CODE EXAMPLE
 

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)
Comment

PREVIOUS NEXT
Code Example
Javascript :: convert buffer to base64 javascript 
Javascript :: ng generate component in folder 
Javascript :: create react app in current folder 
Javascript :: jQuery select immediate children 
Javascript :: get all input values by class jquery 
Javascript :: insert value to html input with javascript variable 
Javascript :: go to nextelementsibling 
Javascript :: jquery on enter click 
Javascript :: how to add elements in javascript html 
Javascript :: sort alphabetically javascript 
Javascript :: flutter jsonDecode UTF8 
Javascript :: loop through object element names javascript 
Javascript :: node download s3 file 
Javascript :: cordova capacitor document viewer fail 
Javascript :: get current month number javascript 
Javascript :: js date year 
Javascript :: convert string to datetime javascript 
Javascript :: how to use keytar electron 
Javascript :: datatable desc active 
Javascript :: laravel ajax delete 
Javascript :: event.preventDefault() in react hook 
Javascript :: save list of dictionaries to json python 
Javascript :: node_env is not an internal or external command error 
Javascript :: cube camera three js 
Javascript :: prevent browser back button jquery 
Javascript :: js go back 
Javascript :: display image base64 in REACT NATIVE 
Javascript :: node js check if a user exists in mysql 
Javascript :: how to get os information nodejs 
Javascript :: es6 compare two arrays 
ADD CONTENT
Topic
Content
Source link
Name
8+7 =