js滚动的代码,为什么我增大滚动区域后,滚动会停止

来源:百度知道 编辑:UC知道 时间:2024/05/29 11:08:48
代码如下:
<div id=demo style=overflow:hidden;height:139;width:232;background:#f4f4f4;color:#ffffff>
<table align=left cellpadding=0 cellspace=0 border=0>
<tr>
<td id=demo1 valign=top>
<img onload="if(this.width>600) {this.resized=true; this.width=600;}" onmouseover="this.style.cursor='hand'" onclick="{window.open('http://www.makewing.com/lanren/jscode/js-0063/images/01.jpg');}" src="http://www.makewing.com/lanren/jscode/js-0063/images/01.jpg" >
<img src="http://www.makewing.com/lanren/jscode/js-0063/images/02.jpg

把table宽度改大点
<table border="1" width="401">

想知道为什么停
function Marquee(){
window.status=demo2.offsetWidth+ "| "+demo.scrollLeft;//加上这句
运行时看下状态栏就知道了。
=========================
还不明白的话
把div的overflow:hidden;
改成overflow:scroll
自己看过程

<table align=left width=400 cellpadding=0 cellspace=0 border=0>
把这个表格的宽度改的和DIV 的 宽度一样就可以来