济南做网站
<div id="demo" style="overflow:hidden;" class="hz1">
	<table border="0" align="center" style=" padding-left:10px; padding-top:5px;"  >
	<tr>
    <td valign="top" id="marquePic1">
	<table width='100%'>
    <tr>
    
    <td align='center' ><a href='http://www.baidu.com' target="_blank"><img src="upfile/linkpic/20020120524999.gif" width='110' height='50' border='0'><br>宏达地板</a></td><td align='center' ><a href='http://www.baidu.com' target="_blank"><img src="upfile/linkpic/91920120525133.jpg" width='110' height='50' border='0'><br>宏达地板</a></td><td align='center' ><a href='http://www.baidu.com' target="_blank"><img src="upfile/linkpic/41620120525886.gif" width='110' height='50' border='0'><br>宏达地板</a></td><td align='center' ><a href='http://www.baidu.com' target="_blank"><img src="upfile/linkpic/19220120525906.jpg" width='110' height='50' border='0'><br>宏达地板</a></td><td align='center' ><a href='http://www.baidu.com' target="_blank"><img src="upfile/linkpic/75620120525449.gif" width='110' height='50' border='0'><br>宏达地板</a></td><td align='center' ><a href='http://www.baidu.com' target="_blank"><img src="upfile/linkpic/7532012052598.jpg" width='110' height='50' border='0'><br>宏达地板</a></td><td align='center' ><a href='http://www.baidu.com' target="_blank"><img src="upfile/linkpic/69220120525269.jpg" width='110' height='50' border='0'><br>宏达地板</a></td><td align='center' ><a href='http://www.shijihongda.cn' target="_blank"><img src="upfile/linkpic/38620120529968.gif" width='110' height='50' border='0'><br>宏达装饰</a></td><td align='center' ><a href='http://www.shijihongda.cn' target="_blank"><img src="upfile/linkpic/23120120529125.gif" width='110' height='50' border='0'><br>宏达装饰</a></td>
    </tr>
    </table>
    </td>
    <td id="marquePic2" valign="top"></td>
    </tr>
	</table>
    </div>

 

<script type="text/javascript"> 
    var speed = 20; //速度数值越大速度越慢
    var marquePic2 = document.getElementById("marquePic2");
    var marquePic1 = document.getElementById("marquePic1");
    var demo = document.getElementById("demo");
    marquePic2.innerHTML = marquePic1.innerHTML
    function Marquee() {
 
        if (marquePic2.offsetWidth - demo.scrollLeft <= 0)//offsetWidth 是对象的可见宽度
            demo.scrollLeft -= marquePic1.offsetWidth; //scrollWidth 是对象的实际内容的宽,不包边线宽度
        else {
            demo.scrollLeft++
        }
 
    }
    var MyMar = setInterval(Marquee, speed)
    demo.onmouseover = function () { clearInterval(MyMar) }
    demo.onmouseout = function () { MyMar = setInterval(Marquee, speed) } 
</script>

 

posted on 2012-05-30 16:33  jkyweb  阅读(211)  评论(0编辑  收藏  举报