Answers for "js select all"

1

javascript get all select options

var options = document.getElementById('mySelectID').options;
for (let i = 0; i < options.length; i++) { 
  console.log(options[i].value);//log the value
}
Posted by: Guest on August-05-2019
2

javascript get all select options

//looping through options select with jQuery
$("#mySelectID option").each(function(){
    var thisOptionValue=$(this).val();
});
Posted by: Guest on August-05-2019
0

select all elements javascript

var elements = document.getElementsByTagName("*");
Posted by: Guest on November-24-2020
0

js select all

// This will select all of the text in the textarea or input called element
element.select();
Posted by: Guest on December-04-2020

Code answers related to "js select all"

Code answers related to "Javascript"

Browse Popular Code Answers by Language