Simple button to close layer div using css style display - Javascript CSS Style Property

Javascript examples for CSS Style Property:display

Description

Simple button to close layer div using css style display

Demo Code

ResultView the demo in separate window

<html>
   <head> 
      <script language="javascript">
      function myFunction()//from   w ww .ja  v a 2  s  . c o m
      {
        document.getElementById("corporate_background").style.display='none';
      }
    
      </script> 
   </head> 
   <body> 
      <p>aajhahaksha</p> 
      <div id="corporate_background"> 
         <a href="javascript:myFunction()">Close</a> 
         <p>content...</p> 
      </div>  
   </body>
</html>

Related Tutorials