JAVA脚本写的主要过程效果不错但在net下不能运行!
<html>
<head>
<meta httpequiv=ContentType content=text/html; charset=gb>
<title>导航菜单</title>
<style type=text/css>
titleStyle{
backgroundcolor:#;color:#ffffff;bordertop:px solid #FFFFFF;fontsize:pt;cursor:hand;
}
ntentStyle{
backgroundcolor:#eeffee;color:blue;fontsize:pt;
}
a{
color:blue;
}
body{
fontsize:pt;
}
</style>
</head>
<body>
<script language=JavaScript>
<!
var layerTop=; //菜单顶边距
var layerLeft=; //菜单左边距
var layerWidth=; //菜单总宽
var titleHeight=; //标题栏高度
var contentHeight=; //内容区高度
var stepNo=; //移动步数数值越大移动越慢
var itemNo=;runtimes=;
documentwrite(<span id=itemsLayer >);
function addItem(itemTitleitemContent){
itemHTML=<div id=item+itemNo+ itemIndex=+itemNo+ ><table width=% cellspacing= cellpadding=>+
<tr><td height=+titleHeight+ onclick=changeItem(+itemNo+) class=titleStyle align=center>+itemTitle+</td></tr>+
<tr><td height=+contentHeight+ class=contentStyle>+itemContent+</td></tr></table></div>;
documentwrite(itemHTML);
itemNo++;
}
//添加菜单标题和内容可任意多项注意格式
addItem(欢迎<BR><img src=hehegif/>);
addItem(网页陶吧<center><a #>网页工具</a> <BR><BR><a #>技术平台</a> <BR><BR><a #>设计理念</a> <BR><BR><a #>更多</a></center>);
addItem(美工教室<center><a #>平面设计 </a> <BR><BR><a #>三维空间</a> <BR><BR><a #>设计基础</a> <BR><BR><a #>更多</a></center>);
addItem(Flash<center><a #>基础教程</a> <BR><BR><a #>技巧运用</a> <BR><BR><a #>实例剖析</a> <BR><BR><a #>更多</a></center>);
addItem(多媒体<center><a #>DIRECTOR</a> <BR><BR><a #>Authorware</a> <BR><BR><a #>更多</a></center>);
addItem(精品赏析<center><a #>设计精品</a></center>);
documentwrite(</span>)
emsLayerstyleheight=itemNo*titleHeight+contentHeight;
toItemIndex=itemNo;onItemIndex=itemNo;
function changeItem(clickItemIndex){
toItemIndex=clickItemIndex;
if(toItemIndexonItemIndex>) moveUp(); else moveDown();
runtimes++;
if(runtimes>=stepNo){
onItemIndex=toItemIndex;
runtimes=;}
else
setTimeout(changeItem(toItemIndex));
}
function moveUp(){
for(i=onItemIndex+;i<=toItemIndex;i++)
eval(em+i+styletop=parseInt(em+i+styletop)contentHeight/stepNo;);
}
function moveDown(){
for(i=onItemIndex;i>toItemIndex;i)
eval(em+i+styletop=parseInt(em+i+styletop)+contentHeight/stepNo;);
}
changeItem();
//>
</script>
</body>