Select type Property - Return which type of form element a drop-down list that allows multiple selections is: - Javascript DOM HTML Element

Javascript examples for DOM HTML Element:Select

Description

Select type Property - Return which type of form element a drop-down list that allows multiple selections is:

Demo Code

ResultView the demo in separate window

<!DOCTYPE html>
<html>
<body>

<form>
<select id="mySelect" multiple>
  <option>CSS</option>
  <option>HTML</option>
  <option>SQL</option>
  <option>Javascript</option>
</select>//from  w  w  w  . j  ava  2  s .c o m
</form>

<button onclick="myFunction()">Test</button>

<p id="demo"></p>

<script>
function myFunction() {
    var x = document.getElementById("mySelect").type;
    document.getElementById("demo").innerHTML = x;
}
</script>

</body>
</html>

Related Tutorials