Click to show and hide DIV content (IE only) : Div : Box Model HTML CSS TUTORIALS


HTML CSS TUTORIALS » Box Model » Div »

 

Click to show and hide DIV content (IE only)


 


<!DOCTYPE html PUBLIC "-//W3C/DTD XHTML 1.0 Transitional//EN"
   "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>ASR Outfitters</title>
<style type="text/css">
<!--
body {font-size : 110}
h1, h2, h3 {font-family : "Comic Sans MS"}
h1 {font-size : 180% ; font-weight : bold}
-->
</style>
<script type="text/javascript" language="javascript">
<!--
function contactus() { 
   if (document.all.contactus.style.display=="none"
      (document.all.contactus.style.display="block");
    else 
      (document.all.contactus.style.display="none")
   }
function otherstuff() { 
   if (document.all.otherstuff.style.display=="none"
      (document.all.otherstuff.style.display="block");
   else 
      (document.all.otherstuff.style.display="none")
   }
function whatwedo() { 
   if (document.all.whatwedo.style.display=="none"
      (document.all.whatwedo.style.display="block");
   else
      (document.all.whatwedo.style.display="none"
   }
function whathere() {
    if (document.all.whathere.style.display=="none"
       (document.all.whathere.style.display="block");
    else 
      (document.all.whathere.style.display="none")
   }
// -->
</script>
</head>
<body>
<p><a href="tour.html">t</a></p>
<hr />
<h2 onclick="whathere()">click me</h2>
<div id="whathere" style="display:none">
<p>This is a test. </p>
<ul>
<li><a href="">This is a test. </a>.</li>
<li><a href="">This is a test. </a>.</li>
<li><a href="">This is a test. </a>.</li>
<li><a href="">This is a test. </a>.</li>
<li><a href="">This is a test. </a>.</li>
</ul>
</div>
<h2 onclick="whatwedo()">click me</h2>
<div id="whatwedo" style="display:none">
<p>This is a test. <a href="">This is a test. </a>.</p>
</div>
<h2 onclick="otherstuff()">click me</h2>
<div id="otherstuff"  style="display:none">
<ul>
<li>This is a test. <i>This is a test. </i>. <a href="http://www.a.com/">
   http://www.a.com/</a>.</li>
<li>This is a test. 
<ol>
<li>This is a test. </li>
<li>This is a test. </li>
<li>This is a test. </li>
</ol>
</li>
</ul>
</div>
<h2 onclick="contactus()">click me</h2>
<div id="contactus"  style="display:none"
<p>This is a test. 
<a href="mailto:a@r.com">
   a@r.com</a>.
   </p>
</div>
</body>
</html>

 



HTML code for linking to this page:

Follow Navioo On Twitter

HTML CSS TUTORIALS

 Navioo Box Model
» Div