谁给我个:多张图片单行从左到右无间断循环滚动的代码
1个回答
2013-09-14
展开全部
<div id="demo">
<table border="0" cellpadding="0" cellspacing="0">
<tr>
<td id="demo1"><table border="0" cellspacing="0" cellpadding="0">
<tr>
<td><table border="0" cellspacing="4" cellpadding="0">
<tr>
<td class="k"><a href='/shownews.aspx?id=261' target="_blank"><img src='/upload/jpg/s261.jpg' border="0" /></a>
</td>
</tr>
<tr>
<td height="20" align="center" valign="top"><a href='/shownews.aspx?id=261' target="_blank">“11·1交通肇事案件”交..</a></td>
</tr>
</table></td>
<td><table border="0" cellspacing="4" cellpadding="0">
<tr>
<td class="k"><a href='/shownews.aspx?id=219' target="_blank"><img src='/upload/jpg/s219.jpg' border="0" /></a>
</td>
</tr>
<tr>
<td height="20" align="center" valign="top"><a href='/shownews.aspx?id=219' target="_blank">警徽在洪峰中闪光——益..</a></td>
</tr>
</table></td>
<td><table border="0" cellspacing="4" cellpadding="0">
<tr>
<td class="k"><a href='/shownews.aspx?id=222' target="_blank"><img src='/upload/jpg/s222.jpg' border="0" /></a>
</td>
</tr>
<tr>
<td height="20" align="center" valign="top"><a href='/shownews.aspx?id=222' target="_blank">民警救人不留名 百姓致谢..</a></td>
</tr>
</table></td>
<td><table border="0" cellspacing="4" cellpadding="0">
<tr>
<td class="k"><a href='/shownews.aspx?id=25' target="_blank"><img src='/upload/jpg/s25.jpg' border="0" /></a>
</td>
</tr>
<tr>
<td height="20" align="center" valign="top"><a href='/shownews.aspx?id=25' target="_blank">金秋最美佳节情——记胡..</a></td>
</tr>
</table></td>
<td><table border="0" cellspacing="4" cellpadding="0">
<tr>
<td class="k"><a href='/shownews.aspx?id=146' target="_blank"><img src='/upload/jpg/s146.jpg' border="0" /></a>
</td>
</tr>
<tr>
<td height="20" align="center" valign="top"><a href='/shownews.aspx?id=146' target="_blank">消防总队3官兵见义勇为,..</a></td>
</tr>
</table></td>
<td><table border="0" cellspacing="4" cellpadding="0">
<tr>
<td class="k"><a href='/shownews.aspx?id=148' target="_blank"><img src='/upload/jpg/s148.jpg' border="0" /></a>
</td>
</tr>
<tr>
<td height="20" align="center" valign="top"><a href='/shownews.aspx?id=148' target="_blank">湖南株洲消防李富华获湖..</a></td>
</tr>
</table></td>
<td><table border="0" cellspacing="4" cellpadding="0">
<tr>
<td class="k"><a href='/shownews.aspx?id=142' target="_blank"><img src='/upload/jpg/s142.jpg' border="0" /></a>
</td>
</tr>
<tr>
<td height="20" align="center" valign="top"><a href='/shownews.aspx?id=142' target="_blank">在湘大学生陈炳哲舍己救..</a></td>
</tr>
</table></td>
</tr>
</table></td>
<td id="demo2"></td>
</tr>
</table>
</div>
<script>function GoToWhere(s)
{
var d = s.options[s.selectedIndex].value;
window.open(d, "_blank");
s.selectedIndex=0;
}var speed=30
demo2.innerHTML=demo1.innerHTML
demo.scrollLeft=demo.scrollWidth
function Marquee(){
if(demo.scrollLeft<=0)
demo.scrollLeft+=demo2.offsetWidth
else{
demo.scrollLeft--
}
}
var MyMar=setInterval(Marquee,speed)
demo.onmouseover=function() {clearInterval(MyMar)}
demo.onmouseout=function() {MyMar=setInterval(Marquee,speed)}
</script>
<table border="0" cellpadding="0" cellspacing="0">
<tr>
<td id="demo1"><table border="0" cellspacing="0" cellpadding="0">
<tr>
<td><table border="0" cellspacing="4" cellpadding="0">
<tr>
<td class="k"><a href='/shownews.aspx?id=261' target="_blank"><img src='/upload/jpg/s261.jpg' border="0" /></a>
</td>
</tr>
<tr>
<td height="20" align="center" valign="top"><a href='/shownews.aspx?id=261' target="_blank">“11·1交通肇事案件”交..</a></td>
</tr>
</table></td>
<td><table border="0" cellspacing="4" cellpadding="0">
<tr>
<td class="k"><a href='/shownews.aspx?id=219' target="_blank"><img src='/upload/jpg/s219.jpg' border="0" /></a>
</td>
</tr>
<tr>
<td height="20" align="center" valign="top"><a href='/shownews.aspx?id=219' target="_blank">警徽在洪峰中闪光——益..</a></td>
</tr>
</table></td>
<td><table border="0" cellspacing="4" cellpadding="0">
<tr>
<td class="k"><a href='/shownews.aspx?id=222' target="_blank"><img src='/upload/jpg/s222.jpg' border="0" /></a>
</td>
</tr>
<tr>
<td height="20" align="center" valign="top"><a href='/shownews.aspx?id=222' target="_blank">民警救人不留名 百姓致谢..</a></td>
</tr>
</table></td>
<td><table border="0" cellspacing="4" cellpadding="0">
<tr>
<td class="k"><a href='/shownews.aspx?id=25' target="_blank"><img src='/upload/jpg/s25.jpg' border="0" /></a>
</td>
</tr>
<tr>
<td height="20" align="center" valign="top"><a href='/shownews.aspx?id=25' target="_blank">金秋最美佳节情——记胡..</a></td>
</tr>
</table></td>
<td><table border="0" cellspacing="4" cellpadding="0">
<tr>
<td class="k"><a href='/shownews.aspx?id=146' target="_blank"><img src='/upload/jpg/s146.jpg' border="0" /></a>
</td>
</tr>
<tr>
<td height="20" align="center" valign="top"><a href='/shownews.aspx?id=146' target="_blank">消防总队3官兵见义勇为,..</a></td>
</tr>
</table></td>
<td><table border="0" cellspacing="4" cellpadding="0">
<tr>
<td class="k"><a href='/shownews.aspx?id=148' target="_blank"><img src='/upload/jpg/s148.jpg' border="0" /></a>
</td>
</tr>
<tr>
<td height="20" align="center" valign="top"><a href='/shownews.aspx?id=148' target="_blank">湖南株洲消防李富华获湖..</a></td>
</tr>
</table></td>
<td><table border="0" cellspacing="4" cellpadding="0">
<tr>
<td class="k"><a href='/shownews.aspx?id=142' target="_blank"><img src='/upload/jpg/s142.jpg' border="0" /></a>
</td>
</tr>
<tr>
<td height="20" align="center" valign="top"><a href='/shownews.aspx?id=142' target="_blank">在湘大学生陈炳哲舍己救..</a></td>
</tr>
</table></td>
</tr>
</table></td>
<td id="demo2"></td>
</tr>
</table>
</div>
<script>function GoToWhere(s)
{
var d = s.options[s.selectedIndex].value;
window.open(d, "_blank");
s.selectedIndex=0;
}var speed=30
demo2.innerHTML=demo1.innerHTML
demo.scrollLeft=demo.scrollWidth
function Marquee(){
if(demo.scrollLeft<=0)
demo.scrollLeft+=demo2.offsetWidth
else{
demo.scrollLeft--
}
}
var MyMar=setInterval(Marquee,speed)
demo.onmouseover=function() {clearInterval(MyMar)}
demo.onmouseout=function() {MyMar=setInterval(Marquee,speed)}
</script>
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询