幻灯片式导航菜单制作 JS
<head>
<title>标题页</title>
</head>
<body>
<script language=javascript>
var index = 9
link = new Array(8);
text = new Array(8);
link[0] ='link1.htm'//保存链接的数组
link[1] ='link2.htm'
link[2] ='link3.htm'
link[3] ='link1.htm'
link[4] ='link2.htm'
link[5] ='link3.htm'
link[6] ='link1.htm'
link[7] ='link2.htm'
link[8] ='link3.htm'
text[0] ='链接说明一'//保存说明的数组
text[1] ='链接说明一'
text[2] ='链接说明一'
text[3] ='链接说明一'
text[4] ='链接说明一'
text[5] ='链接说明一'
text[6] ='链接说明一'
text[7] ='链接说明一'
text[8] ='链接说明一'
//实现滚动的脚本
document.write ("<marquee scrollamount='1' scrolldelay='100' direction= 'up' width='150' height='150'>");
for (i=0;i<index;i++){
document.write (" <a href="+link[i]+" target='_blank'>"); //循环输出链接内容
document.write (text[i] + "</A><br>");
}
document.write ("</marquee>")
</script>
</body>
</html>