Morpheusweb.it - Risorse per webmaster: script, ASP.NET, C#, Visual Basic .Net, tutorial, asp, javascript, css, php, html, java, ADO, VBScript, forms, frames, Active Server Pages, Dynamic HTML, database, gratis per webmaster e webdesigner

Menubar

Una menubar che si sposta quando scrolliamo la pagina.


¤ Clicca qui per visualizzare la demo... ¤

<html>
<head>
<title>
Sticky Menu Bar</title>

<script language=javaScript>


function setVariables()
{
  if
(navigator.appName == "Netscape")
  {
    v = ".top=";
    dS = "document.";
    sD = "";
    y = "window.pageYOffset"
  }
  else
  {

    v = ".pixelTop=";
    dS = "";
    sD = ".style";
    y = "document.body.scrollTop"
  }
}

function
checkLocation()
{
  object = "object1";
  yy = eval(y);
  eval(dS+object+sD+v+yy);
  setTimeout("checkLocation()",10)
}
</script>

</HEAD>
<body onload="
setVariables();checkLocation()" bgcolor="#eeeeee">
<div id="object1" style="position:absolute; visibility:show; left:0px; top:0px; z-index:2">
<table border="0" cellspacing="20" cellpadding="0">
<tr>
<td bgcolor=eeeeee><CENTER>
Menu Bar</CENTER></td>
</tr>
<tr>
<td><a href="javascript:void(0)" >
Menu Item 1</a></td>
</tr>
<tr>
<td><a href="javascript:void(0)" >
Menu Item 2</a></td>
</tr>
<tr>
<td><a href="javascript:void(0)" >
Menu Item 3</a></td>
</tr>
<tr>
<td><a href="javascript:void(0)" >
Menu Item 4</a></td>
</tr>
</table>
</div>
<table>
<tr><td width=130>
<FONT COLOR="#FFFFFF">a</FONT>
</td><td>
<CENTER>

The Main Part of the Page<br>
(scroll to see the sticky menu bar)
</CENTER>
<br>.
<br>.
<br>.
<br>.
<br>.
<br>.
<br>.
<br>.
<br>.
<br>.
<br>.
<br>.
<br>.
<br>.
<br>.
<br>.

Part way down
<br>.
<br>.
<br>.
<br>.
<br>.
<br>.
<br>.
<br>.
<br>.
<br>.
<br>.
<br>.
<br>.
<br>.
<br>.
<br>.

The End
<br>.
<br>.
<br>.
<br>.
<br>.
<br>.
<br>.
<br>.
</td></tr>
</table>
</html>



Scarica il Codice...


Stampa la pagina


 

Inizio pagina

risorse per webmaster