Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

js select remove all options javascript

	document.querySelectorAll('#mySelect option').forEach(o => o.remove());
Comment

js clear all select options

for (var option of document.querySelectorAll('#DropList option'))
{ 
  option.remove();
}
Comment

PREVIOUS NEXT
Code Example
Javascript :: javascript get parent by tag 
Javascript :: express req body undefined 
Javascript :: jquery addclass 
Javascript :: angular stoppropagatio 
Javascript :: javascript log html element as dom object 
Javascript :: jquery remove focus from all elements 
Javascript :: react function being called every minute 
Javascript :: flask return status code 200 and json 
Javascript :: how to send query parameters in url vuejs 
Javascript :: smooth-scroll.js 
Javascript :: Close popup window 
Javascript :: remove char from string js 
Javascript :: loop through array javascript 
Javascript :: rounding number to x decimals javascript 
Javascript :: javascript long integer 
Javascript :: js var audio = new audio 
Javascript :: process.stdin.on("data", function (input) { _input += input; }); 
Javascript :: how to hide react navigation header in react native 
Javascript :: how to add custom font to react project 
Javascript :: javascript determine if string is valid url 
Javascript :: react app js 
Javascript :: angular http loader 
Javascript :: javascript override shortcut 
Javascript :: difference between react native and react 
Javascript :: multipline and single line regex pattern 
Javascript :: A <Route is only ever to be used as the child of <Routes element, never rendered directly. Please wrap your <Route in a <Routes. 
Javascript :: two sum javascript solution 
Javascript :: debounce js 
Javascript :: covid-19 
Javascript :: quasar apexchart 
ADD CONTENT
Topic
Content
Source link
Name
2+5 =