222、导航菜单静止不动

222、导航菜单静止不动

静止图片脚本
注意:把< body>区域改为 < body onload="setVariables(); checkLocation();">

以下代码加入<head>区域

<SCRIPT LANGUAGE="JavaScript">

 

function setVariables() {

 

imgwidth=235;

 

imgheight=19;

 

if (navigator.appName == "Netscape") {

 

horz=".left";

 

vert=".top";

 

docStyle="document.";

 

styleDoc="";

 

innerW="window.innerWidth";

 

innerH="window.innerHeight";

 

offsetX="window.pageXOffset";

 

offsetY="window.pageYOffset";

 

}

 

else {

 

horz=".pixelLeft";

 

vert=".pixelTop";

 

docStyle="";

 

styleDoc=".style";

 

innerW="document.body.clientWidth";

 

innerH="document.body.clientHeight";

 

offsetX="document.body.scrollLeft";

 

offsetY="document.body.scrollTop";

 

   }

 

}

 

function checkLocation() {

 

objectXY="branding";

 

var availableX=eval(innerW);

 

var availableY=eval(innerH);

 

var currentX=eval(offsetX);

 

var currentY=eval(offsetY);

 

x=availableX-(imgwidth+30)+currentX;

 

y=availableY-(imgheight+20)+currentY;

 

evalMove();

 

setTimeout("checkLocation()",10);

 

}

 

function evalMove() {

 

eval(docStyle + objectXY + styleDoc + horz + "=" + x);

 

eval(docStyle + objectXY + styleDoc + vert + "=" + y);

 

}

 

</script>

 

以下代码加入<body>区域

<div id="branding" style="position:absolute; visibility:show; left:235px; top:50px; z-index:2">

 

<table width=10 bgcolor=#ffffff><td>

 

<a href="http://www.7stk.com/" onmouseover="window.status='哇哈特效站';return true" onmouseout="window.status='';return true"><center><img src="branding.gif" width="240" height="20" border="0"></center></a></font></td>

 

</table>

 

</div>

Write a comment

Comments: 0