Javascript examples for CSS Style Property:visibility
Return the visibility type of a <p> element:
<!DOCTYPE html> <html> <body> <p id="myP" style="visibility:hidden;">This is a p element.</p> <button type="button" onclick="myFunction()">Return the visibility type of p</button> <script> function myFunction() {//from ww w .j av a2s.com console.log(document.getElementById("myP").style.visibility); } </script> </body> </html>