我有一个已经做好的,但是用到数据库的。
给你一个雏形的吧,自己研究一下。
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>无标题文档</title>
</head><body style="margin:0px">
<table width="110" border="0" align="center" cellpadding="2" cellspacing="0" height="300px">
  <tr>
    <td id="i">
<marquee id="mar" direction="up" behavior="slide" height="100px" style="background-Color:#00ff00">
<div style="background-Color:#ff0000" id="div">
      <p><a href="#">分类一</a></p>
      <p>分类二</p>
      <p>分类三</p>
      <p>分类四</p>
      <p>分类五</p>
      <p>分类六</p>
    </div>
</marquee>
<div id="div"></div>
</td>
  </tr>
  <tr>
    <td> 
      <input type="button" name="btnUp" value="向上" onMouseOver="UpScroll();" onMouseOut="StopScroll();">
      <input name="btnDown" type="button" value="向下" onMouseOver="DownScroll();" onMouseOut="StopScroll();">
    </td>
  </tr>
</table>
<script language="JavaScript">
var timer;
var mar = document.all.mar;
var div = document.all.div;
var h1 = div.offsetHeight;
var h2 = mar.height;
//向上移动
function UpMarquee(){
if(mar.scrollTop>=h1)
StopScroll();
else
mar.scrollTop+=1;
}
function DownMarquee(){
if(mar.scrollTop<=h2)
StopScroll();
else
mar.scrollTop-=1;
//alert(mar.scrollTop);
}
//循环调用向下移动函数
function UpScroll(){
//alert(mar.scrollTop);
//StopScroll();
timer = setInterval('UpMarquee()',50);//循环调用
}
//循环调用向上移动函数
function DownScroll(){
//StopScroll();
timer = setInterval('DownMarquee()',50);//循环调用
}
//清除循环调用
function StopScroll(){
clearInterval(timer);
}
</script>
</body>
</html>