Tim: Navigationsleiste wie beim Windows Explorer

Beitrag lesen

Hi,
ich habe jetzt doch keine if then else funltion gewählt.
mein problem habe ich jetzt so gelöst:
<html>
<head>
 <style type="text/css">
   #blau {
      display: none;
   }
 </style>
 <script type="text/javascript">
   function ein() {
     document.getElementById('blau').style.display = 'block';
   }
   function aus() {
     document.getElementById('blau').style.display = 'none';
   }
</script>
</head>
<body>
<span onclick="ein()"><div id="rot" style="background-color:#0000ff; width:100px; height:100px; position:absolute; top:200px; left:200px; z-index:1;"></div></span>

<span onclick="aus()"><div id="blau" style="background-color:#ff0000; width:100px; height:100px; position:absolute; top:200px; left:200px; z-index:2;"></div></span>

</body>
</html>

aber danke ChrisB für deine hilfe.
mfg TimK