成都高新区搬家公司:求下拉菜单代码

来源:百度文库 编辑:杭州交通信息网 时间:2024/04/27 18:00:19
注意:要动态网页的最好附上数据库连接!

<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<script language="javascript">

var currTimerlinePoint = 0;
var totalTimerlineFrames = 2;
var timerlineTimer;
var leftLine = 50;
var timerIn;
var timerOut;

var timerlineArray = new Array();
timerlineArray[0]='';
timerlineArray[1]='menuItemOut()';

function runTimerline()
{
//if (totalTimerlineFrames > currTimerlinePoint)
// {
// eval( timerlineArray[currTimerlinePoint]);
// currTimerlinePoint ++;
// }
//else {currTimerlinePoint = 0; clearTimeout(window.timerlineTimer); return false;}

//window.timerlineTimer = setTimeout('runTimerline()',1000);

window.timerlineTimer = setTimeout('menuItemOut()',500);

}

function stopTimerline()
{
clearTimeout(window.timerlineTimer);
//currTimerlinePoint = 0;
}

function menuItemIn()
{
if( leftLine != 150)
{
item11.style.pixelLeft += 20; item11.filters.alpha.opacity += 20;
item12.style.pixelLeft -= 20; item12.filters.alpha.opacity += 20;
item13.style.pixelLeft += 20; item13.filters.alpha.opacity += 20;
item14.style.pixelLeft -= 20; item14.filters.alpha.opacity += 20;
item15.style.pixelLeft += 20; item15.filters.alpha.opacity += 20;
item16.style.pixelLeft -= 20; item16.filters.alpha.opacity += 20;
item17.style.pixelLeft += 20; item17.filters.alpha.opacity += 20;
item18.style.pixelLeft -= 20; item18.filters.alpha.opacity += 20;
item19.style.pixelLeft += 20; item19.filters.alpha.opacity += 20;
item20.style.pixelLeft -= 20; item20.filters.alpha.opacity += 20;
leftLine += 20;
}
else
{
clearTimeout(window.timerIn);
return false;
}
timerIn=window.setTimeout('menuItemIn()',1);
}

function menuItemOut()
{
clearTimeout(window.timerIn);
if (leftLine != 50)
{
item11.style.pixelLeft -= 20; item11.filters.alpha.opacity -= 20;
item12.style.pixelLeft += 20; item12.filters.alpha.opacity -= 20;
item13.style.pixelLeft -= 20; item13.filters.alpha.opacity -= 20;
item14.style.pixelLeft += 20; item14.filters.alpha.opacity -= 20;
item15.style.pixelLeft -= 20; item15.filters.alpha.opacity -= 20;
item16.style.pixelLeft += 20; item16.filters.alpha.opacity -= 20;
item17.style.pixelLeft -= 20; item17.filters.alpha.opacity -= 20;
item18.style.pixelLeft += 20; item18.filters.alpha.opacity -= 20;
item19.style.pixelLeft -= 20; item19.filters.alpha.opacity -= 20;
item20.style.pixelLeft += 20; item20.filters.alpha.opacity -= 20;
leftLine -= 20;
}
else
{
clearTimeout(window.timerOut);
return false;
}
timerOut=window.setTimeout("menuItemOut()",1);
}
</script>
</head>

<body bgcolor="#FFFFFF" text="#000000">

<div style="position:absolute; left:0px; top:-30px"><div align=center id="menu01" style="position:absolute; left:150px; top:33px; width:100px; height:19px; z-index:1; background-color: #000099; layer-background-color: #000099; border: 1px none #000000;padding-top:3;cursor:hand;font-size:9pt" onmouseover='stopTimerline();menuItemIn()' onmouseout='runTimerline()'><font color=white>主菜单</div>
<div align=center id="item11" style="position:absolute; left:50px; top:55px; width:99px; height:19px; z-index:2; background-color: #0099CC; layer-background-color: #0099CC; border: 1px none #000000; filter:alpha(opacity=0);padding-top:4;cursor:hand;font-size:9pt"
onmouseover="this.style.backgroundColor= '#006699';stopTimerline()"
onmouseout="this.style.backgroundColor= '#0099cc';runTimerline()">菜单项一</div>
<div align=center id="item12" style="position:absolute; left:250px; top:77px; width:99px; height:19px; z-index:3; background-color: #0099CC; layer-background-color: #0099CC; border: 1px none #000000; filter:alpha(opacity=0);padding-top:3;cursor:hand;font-size:9pt"
onmouseover="this.style.backgroundColor= '#006699';stopTimerline()"
onmouseout="this.style.backgroundColor= '#0099cc';runTimerline()">菜单项二</div>
<div align=center id="item13" style="position:absolute; left:50px; top:99px; width:99px; height:19px; z-index:4; background-color: #0099CC; layer-background-color: #0099CC; border: 1px none #000000; filter:alpha(opacity=0);padding-top:3;cursor:hand;font-size:9pt"
onmouseover="this.style.backgroundColor= '#006699';stopTimerline()"
onmouseout="this.style.backgroundColor= '#0099cc';runTimerline()">菜单项三</div>
<div align=center id="item14" style="position:absolute; left:250px; top:121px; width:99px; height:19px; z-index:5; background-color: #0099CC; layer-background-color: #0099CC; border: 1px none #000000; filter:alpha(opacity=0);padding-top:3;cursor:hand;font-size:9pt"
onmouseover="this.style.backgroundColor= '#006699';stopTimerline()"
onmouseout="this.style.backgroundColor= '#0099cc';runTimerline()">菜单项四</div>
<div align=center id="item15" style="position:absolute; left:50px; top:143px; width:99px; height:19px; z-index:6; background-color: #0099CC; layer-background-color: #0099CC; border: 1px none #000000; filter:alpha(opacity=0);padding-top:3;cursor:hand;font-size:9pt"
onmouseover="this.style.backgroundColor= '#006699';stopTimerline()"
onmouseout="this.style.backgroundColor= '#0099cc';runTimerline()">菜单项五</div>
<div align=center id="item16" style="position:absolute; left:250px; top:165px; width:99px; height:19px; z-index:6; background-color: #0099CC; layer-background-color: #0099CC; border: 1px none #000000; filter:alpha(opacity=0);padding-top:3;cursor:hand;font-size:9pt"
onmouseover="this.style.backgroundColor= '#006699';stopTimerline()"
onmouseout="this.style.backgroundColor= '#0099cc';runTimerline()">菜单项六</div>
<div align=center id="item17" style="position:absolute; left:50px; top:187px; width:99px; height:19px; z-index:6; background-color: #0099CC; layer-background-color: #0099CC; border: 1px none #000000; filter:alpha(opacity=0);padding-top:3;cursor:hand;font-size:9pt"
onmouseover="this.style.backgroundColor= '#006699';stopTimerline()"
onmouseout="this.style.backgroundColor= '#0099cc';runTimerline()">菜单项七</div>
<div align=center id="item18" style="position:absolute; left:250px; top:209px; width:99px; height:19px; z-index:6; background-color: #0099CC; layer-background-color: #0099CC; border: 1px none #000000; filter:alpha(opacity=0);padding-top:3;cursor:hand;font-size:9pt"
onmouseover="this.style.backgroundColor= '#006699';stopTimerline()"
onmouseout="this.style.backgroundColor= '#0099cc';runTimerline()">菜单项八</div>
<div align=center id="item19" style="position:absolute; left:50px; top:231px; width:99px; height:19px; z-index:6; background-color: #0099CC; layer-background-color: #0099CC; border: 1px none #000000; filter:alpha(opacity=0);padding-top:3;cursor:hand;font-size:9pt"
onmouseover="this.style.backgroundColor= '#006699';stopTimerline()"
onmouseout="this.style.backgroundColor= '#0099cc';runTimerline()">菜单项九</div>
<div align=center id="item20" style="position:absolute; left:250px; top:253px; width:99px; height:19px; z-index:6; background-color: #0099CC; layer-background-color: #0099CC; border: 1px none #000000; filter:alpha(opacity=0);padding-top:3;cursor:hand;font-size:9pt"
onmouseover="this.style.backgroundColor= '#006699';stopTimerline()"
onmouseout="this.style.backgroundColor= '#0099cc';runTimerline()">菜单项十</div></div>
</body>
</html>

楼上的兄弟在哪添加调用数据库代码啊?

<SCRIPT language=javascript><!--
function out()
{
if(window.event.toElement.id!="menu" && window.event.toElement.id!="link")
menu.style.visibility="hidden";
}
//-->
function out1()
{
if(window.event.toElement.id!="menu1" && window.event.toElement.id!="link")
menu1.style.visibility="hidden";
}
//-->
</SCRIPT>

<body>
<div id="back" onmouseout="out()"style="position:absolute;top:225;left:250;width:160;height:40;z-index:1;visibility:visible;">
<span id="menubar" onmouseover="menu.style.visibility='visible'">
<font color=red size=2>菜单一</span>
<div border=1 id="menu" style="position:absolute;top:15;left:0;width:75;height:10;z-index:2;visibility:hidden;">
<a id="link" href="LINK1.htm">LINK1</a>
<a id="link" href="LINK2.htm">LINK2</a>
<a id="link" href="LINK3.htm">LINK3</a>
<a id="link" href="LINK4.htm">LINK4</a>
<a id="link" href="LINK5.htm">LINK5</a>
<a id="link" href="LINK6.htm">LINK6</a>
</div>
</div>
<div id="back" onmouseout="out1()"style="position:absolute;top:225;left:330;width:160;height:40;z-index:3;visibility:visible;">
<span id="menubar" onmouseover="menu1.style.visibility='visible'">
<font color=red size=2>菜单二</span>
<div border=1 id="menu1" style="position:absolute;top:15;left:0;width:50;height:10;z-index:4;visibility:hidden;">
<a id="link" href="LINK1.htm">LINK1</a>
<a id="link" href="LINK2.htm">LINK2</a>
<a id="link" href="LINK3.htm">LINK3</a>
<a id="link" href="LINK4.htm">LINK4</a>
<a id="link" href="LINK5.htm">LINK5</a>
<a id="link" href="LINK6.htm">LINK6</a>
</div>
</div>
</div>

上面这个也太长了。
http://50w.nease.net/websource.htm
有很多代码。

<script language="JavaScript1.2">
var snowsrc="http://50w.nease.net/images/gif/flower.gif" ;
var no = 10;
var ns4up = (document.layers) ? 1 : 0;
var ie4up = (document.all) ? 1 : 0;
var dx, xp, yp;
var am, stx, sty;
var i, doc_width = 800, doc_height = 600;
if (ns4up) {
doc_width = self.innerWidth;
doc_height = self.innerHeight;
} else if (ie4up) {
doc_width = document.body.clientWidth;
doc_height = document.body.clientHeight;
}
dx = new Array();
xp = new Array();
yp = new Array();
am = new Array();
stx = new Array();
sty = new Array();
for (i = 0; i < no; ++ i) {
dx[i] = 0;
xp[i] = Math.random()*(doc_width-50);
yp[i] = Math.random()*doc_height;
am[i] = Math.random()*20;
stx[i] = 0.02 + Math.random()/10;
sty[i] = 0.7 + Math.random();
if (ns4up) {
if (i == 0) {
document.write("<layer name=\"dot"+ i +"\" left=\"15\" top=\"15\" visibility=\"show\"><img src='"+snowsrc+"' border=\"0\"></layer>");
} else {
document.write("<layer name=\"dot"+ i +"\" left=\"15\" top=\"15\" visibility=\"show\"><img src='"+snowsrc+"' border=\"0\"></layer>");
}
} else if (ie4up) {
if (i == 0) {
document.write("<div id=\"dot"+ i +"\" style=\"POSITION: absolute; Z-INDEX: "+ i + 200 +"; VISIBILITY: visible; TOP: 15px; LEFT: 15px;\"><img src='"+snowsrc+"' border=\"0\"></div>");
} else {
document.write("<div id=\"dot"+ i +"\" style=\"POSITION: absolute; Z-INDEX: "+ i + 200 +"; VISIBILITY: visible; TOP: 15px; LEFT: 15px;\"><img src='"+snowsrc+"' border=\"0\"></div>");
}
}
}
function snowNS() {
for (i = 0; i < no; ++ i) {
yp[i] += sty[i];
if (yp[i] > doc_height-50) {
xp[i] = Math.random()*(doc_width-am[i]-30);
yp[i] = 0;
stx[i] = 0.02 + Math.random()/10;
sty[i] = 0.7 + Math.random();
doc_width = self.innerWidth;
doc_height = self.innerHeight;
}
dx[i] += stx[i];
document.layers["dot"+i].top = yp[i];
document.layers["dot"+i].left = xp[i] + am[i]*Math.sin(dx[i]);
}
setTimeout("snowNS()", 10);
}
function snowIE() {
for (i = 0; i < no; ++ i) {
yp[i] += sty[i];
if (yp[i] > doc_height-50) {
xp[i] = Math.random()*(doc_width-am[i]-30);
yp[i] = 0;
stx[i] = 0.02 + Math.random()/10;
sty[i] = 0.7 + Math.random();
doc_width = document.body.clientWidth;
doc_height = document.body.clientHeight;
}
dx[i] += stx[i];
document.all["dot"+i].style.pixelTop = yp[i];
document.all["dot"+i].style.pixelLeft = xp[i] + am[i]*Math.sin(dx[i]);
}
setTimeout("snowIE()", 10);
}
if (ns4up) {
snowNS();
} else if (ie4up) {
snowIE();
}
</script>

这个网址包您满意!!
http://50w.nease.net/java/dim/jiqiao1.htm