Javascript examples for CSS Style Property:display
Difference between "inline", "block" and "none":
<!DOCTYPE html> <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>//from w w w.j a v a 2s .c om <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> </html>