<html>
<body>
<p>Select a display type in the list below to change <span id="mySpan" style="color:blue;">this span element's</span> display type.</p>
<select onchange="myFunction(this);" size="3">
<option>block
<option>inline
<option>none
</select>
<script>
function myFunction(x) {
var whichSelected = x.selectedIndex;
var sel = x.options[whichSelected].text;
var elem = document.getElementById("mySpan");
elem.style.display = sel;
}
</script>
</body>
<!-- Mirrored from www.w3schools.com/jsref/tryit.asp?filename=tryjsref_style_display3 by HTTrack Website Copier/3.x [XR&CO'2014], Mon, 27 Jan 2020 03:03:39 GMT -->
</html>