不能运行啊……
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>走马灯</title>
<style type="text/css">
* { margin: 0; padding: 0; border: 0; font-family: Microsoft Yahei; }
#wrap { width: 199px; margin: 50px auto 0; }
#head { width: 199px; height: 70px; text-align: center; }
#head span { display: inline-block;line-height: 70px; }
#list { height: 70px; overflow: hidden;}
</style>
</head>
<body>
<div id="wrap">
<div id="head"><span>向上滚动样式</span></div>
<div id="list">
<ul id="list1">
<li>1.滚动信息</li>
<li>2.滚动信息</li>
<li>3.滚动信息</li>
<li>4.滚动信息</li>
<li>5.滚动信息</li>
<li>6.滚动信息</li>
<li>7.滚动信息</li>
<li>8.滚动信息</li>
<li>9.滚动信息</li>
</ul>
<ul id="list2"></ul>
</div>
</div>
<script type="text/javascript">
var area = document.getElementById('list');
var list1 = document.getElenemntById('list1');
var list2 = document.getElenemntById('list2');
var speed = 50;
area.scrollTop = 0;
list2.innerHTML = list1.innerHTML;
function scrollUp() {
if(area.scrollTop >= list1.scrollHeight) {
area.scrollTop = 0;
} else {
area.scrollTop++;
}
}
var ScrollUp = setInterval("scrollUp()", speed);
area.onmouseover = function() {
clearInterval(ScrollUp);
}
area.onmouseout = function() {
ScrollUp = setInterval("scrollUp()", speed);
}
</script>
</body>
</html>