table内容连续滚动

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
<html>
<head>
<title>	</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<style type="text/css">
* {padding: 0; margin: 0};
td {height: 28px;};
</style>
</head>
<body bgcolor="#FFFFFF">
<div style="padding-top: 100px;">
<table width="600" border="1" align="center" cellpadding="0" cellspacing="0" bordercolor="4FBFF9">
	<tr>
		<td width="120" align="center">业务流水号</td>
		<td width="130" align="center">业务名称</td>
		<td width="150" align="center">申请企业名称</td>
		<td width="100" align="center">申报日期</td>
		<td width="100" align="center">办理状态</td>
	</tr>
</table>
</div>
<div id="demo" style="overflow: hidden; height: 240;">
	<div id="demo1">
		<table width="600" border="0" align="center" cellpadding="0" cellspacing="0" bordercolor="4FBFF9">
			<tr>
				<td width="120" align="center">201404020001</td>
				<td width="130">测试业务</td>
				<td width="150">申请企业名称</td>
				<td width="100" align="center">2014-03-13</td>
				<td width="100" align="center">在办</td>
			</tr>
			<tr>
				<td align="center">201404020002</td>
				<td>测试业务</td>
				<td>申请企业名称</td>
				<td align="center">2014-03-13</td>
				<td align="center">在办</td>
			</tr>
			<tr>
				<td align="center">201404020003</td>
				<td>测试业务</td>
				<td>申请企业名称</td>
				<td align="center">2014-03-13</td>
				<td align="center">在办</td>
			</tr>
			<tr>
				<td align="center">201404020004</td>
				<td>测试业务</td>
				<td>申请企业名称</td>
				<td align="center">2014-03-13</td>
				<td align="center">在办</td>
			</tr>
			<tr>
				<td align="center">201404020005</td>
				<td>测试业务</td>
				<td>申请企业名称</td>
				<td align="center">2014-03-13</td>
				<td align="center">在办</td>
			</tr>
			<tr>
				<td align="center">201404020006</td>
				<td>测试业务</td>
				<td>申请企业名称</td>
				<td align="center">2014-03-13</td>
				<td align="center">在办</td>
			</tr>
			<tr>
				<td align="center">201404020007</td>
				<td>测试业务</td>
				<td>申请企业名称</td>
				<td align="center">2014-03-13</td>
				<td align="center">在办</td>
			</tr>
			<tr>
				<td align="center">201404020008</td>
				<td>测试业务</td>
				<td>申请企业名称</td>
				<td align="center">2014-03-13</td>
				<td align="center">在办</td>
			</tr>
			<tr>
				<td align="center">201404020009</td>
				<td>测试业务</td>
				<td>申请企业名称</td>
				<td align="center">2014-03-13</td>
				<td align="center">在办</td>
			</tr>
			<tr>
				<td align="center">201404020010</td>
				<td>测试业务</td>
				<td>申请企业名称</td>
				<td align="center">2014-03-13</td>
				<td align="center">在办</td>
			</tr>
			<tr>
				<td align="center">201404020011</td>
				<td>测试业务</td>
				<td>申请企业名称</td>
				<td align="center">2014-03-13</td>
				<td align="center">在办</td>
			</tr>
			<tr>
				<td align="center">201404020012</td>
				<td>测试业务</td>
				<td>申请企业名称</td>
				<td align="center">2014-03-13</td>
				<td align="center">在办</td>
			</tr>
			<tr>
				<td align="center">201404020013</td>
				<td>测试业务</td>
				<td>申请企业名称</td>
				<td align="center">2014-03-13</td>
				<td align="center">在办</td>
			</tr>
			<tr>
				<td align="center">201404020014</td>
				<td>测试业务</td>
				<td>申请企业名称</td>
				<td align="center">2014-03-13</td>
				<td align="center">在办</td>
			</tr>
			<tr>
				<td align="center">201404020015</td>
				<td>测试业务</td>
				<td>申请企业名称</td>
				<td align="center">2014-03-13</td>
				<td align="center">在办</td>
			</tr>
			<tr>
				<td align="center">201404020016</td>
				<td>测试业务</td>
				<td>申请企业名称</td>
				<td align="center">2014-03-13</td>
				<td align="center">在办</td>
			</tr>
			<tr>
				<td align="center">201404020017</td>
				<td>测试业务</td>
				<td>申请企业名称</td>
				<td align="center">2014-03-13</td>
				<td align="center">在办</td>
			</tr>
			<tr>
				<td align="center">201404020018</td>
				<td>测试业务</td>
				<td>申请企业名称</td>
				<td align="center">2014-03-13</td>
				<td align="center">在办</td>
			</tr>
			<tr>
				<td align="center">201404020019</td>
				<td>测试业务</td>
				<td>申请企业名称</td>
				<td align="center">2014-03-13</td>
				<td align="center">在办</td>
			</tr>
			<tr>
				<td align="center">201404020020</td>
				<td>测试业务</td>
				<td>申请企业名称</td>
				<td align="center">2014-03-13</td>
				<td align="center">在办</td>
			</tr>
		</table>
	</div>
	<div id="demo2"></div>
</div>
<script type="text/javascript">
var speed = 50;
demo2.innerHTML = demo1.innerHTML;
function Marquee() {
	console.log("demo2.offsetTop"+demo2.offsetTop)
	if (demo.scrollTop>=(demo.offsetTop/3)) {
		demo.scrollTop=0;;
	} else {
		demo.scrollTop++;
	}
}
var MyMar = setInterval(Marquee, speed);
 
demo.onmouseover = function() {
	clearInterval(MyMar);
}
 
demo.onmouseout = function() {
	MyMar = setInterval(Marquee, speed);
}
</script>
</body>
</html>

备注:转载内容

如果 你使用的是
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0.1 Transitional//EN" >
则无法使用这种js 语法实现 将其 改成4.0 就可以了
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值