带链接且点击显示文字的移动图片代码
发布时间:2013-08-23 12:01:46 作者:杜振方 发布者:dzfwlbj 浏览次数:2548 类别:指导文章
<script type="text/javascript">
document.write('<table align=center width=960 border=0 cellpadding=0 cellspacing=0 style=BORDER-LEFT: #cccccc 1px solid;BORDER-RIGHT: #cccccc 1px solid>');
document.write(' <tr> ');
document.write(' <td width=400 height=120 align=center class=border01 bgcolor=#FFFFFF>');
document.write(' <div id=demo style=overflow:hidden;width:400;align=center>');
document.write(' <table border=0 align=center cellpadding=1 cellspacing=1 cellspace=0 >');
document.write(' <tr>');
document.write(' <td valign=top bgcolor=ffffff id=marquePic1> ');
document.write(' <table width=90% border=0 cellspacing=0 cellpadding=0>');
document.write(' <tr align=center> ');
document.write(' <td><a href="http://www.zwpgk.com" title="作文批改网" target="new"><img src="http://www.zwpgk.com/00010.jpg" width="150" height="86" border=0 ></a></td>');
document.write(' <td><a href="http://www.zwpgk.com" title="作文批改网" target="new"><img src="http://www.zwpgk.com/00010.jpg" width="150" height="86" border=0></a></td>');
document.write(' <td><a href="http://www.zwpgk.com" title="作文批改网" target="new"><img src="http://www.zwpgk.com/00010.jpg" width="150" height="86" border=0></a></td>');
document.write(' <td><a href="http://www.zwpgk.com" title="作文批改网" target="new"><img src="http://www.zwpgk.com/00010.jpg" width="150" height="86" border=0></a></td>');
document.write(' <td><a href="http://www.zwpgk.com" title="作文批改网" target="new"><img src="http://www.zwpgk.com/00010.jpg" width="150" height="86" border=0></a></td>');
document.write(' <td><a href="http://www.zwpgk.com" title="作文批改网" target="new"><img src="http://www.zwpgk.com/00010.jpg" width="150" height="86" border=0></a></td>');
document.write(' <td><a href="http://www.zwpgk.com" title="作文批改网" target="new"><img src="http://www.zwpgk.com/00010.jpg" width="150" height="86" border=0></a></td>');
document.write(' <td><a href="http://www.zwpgk.com" title="作文批改网" target="new"><img src="http://www.zwpgk.com/00010.jpg" width="150" height="86" border=0></a></td>');
document.write(' </tr>');
document.write(' </table>');
document.write(' </td>');
document.write(' <td id=marquePic2 valign=top></td>');
document.write(' </tr>');
document.write(' </table>');
document.write(' </div>');
document.write(' </td>');
document.write(' </tr>');
document.write(' </table>');
var speed=1
marquePic2.innerHTML=marquePic1.innerHTML
function Marquee(){
if(demo.scrollLeft>=marquePic1.scrollWidth){
demo.scrollLeft=0
}else{
demo.scrollLeft++
}
}
var MyMar=setInterval(Marquee,speed)
demo.onmouseover=function() {clearInterval(MyMar)}
demo.onmouseout=function() {MyMar=setInterval(Marquee,speed)}
</script>