2套JS无缝滚动图片代码怎么能不冲突?
<!--下面是向左滚动代码--><divid="jsweb8_cn_left"style="overflow:hidden;width:975px;margin:15px...
<!--下面是向左滚动代码-->
<div id="jsweb8_cn_left" style="overflow:hidden;width:975px; margin:15px auto;">
<table width="203" height="170" border="0" cellpadding="0" cellspacing="0">
<tr><td width="179" align="center" valign="top" id="jsweb8_cn_left1">
<table width="153" height="178" border="0" cellpadding="2" cellspacing="0">
<tr align="center">
<td height="160"><img src="images/form1.jpg" width="130" height="150" border="0"></td>
<td height="160"><img src="images/form1.jpg" width="130" height="150" border="0"></td>
<td height="160"><img src="images/form1.jpg" width="130" height="150" border="0"></td></tr>
<tr align="center">
<td> </td>
</tr>
</table>
</td>
<td width="24" valign="top" id="jsweb8_cn_left2"></td>
</tr>
</table>
</div>
<script>
var speed=30//速度数值越大速度越慢
jsweb8_cn_left2.innerHTML=jsweb8_cn_left1.innerHTML
function Marquee3(){
if(jsweb8_cn_left2.offsetWidth-jsweb8_cn_left.scrollLeft<=0)
jsweb8_cn_left.scrollLeft-=jsweb8_cn_left1.offsetWidth
else{
jsweb8_cn_left.scrollLeft++
}
}
var MyMar3=setInterval(Marquee3,speed)
jsweb8_cn_left.onmouseover=function() {clearInterval(MyMar3)}
jsweb8_cn_left.onmouseout=function() {MyMar3=setInterval(Marquee3,speed)}
</script>
<!--向左滚动代码结束-->
然后下面再套一模一样的代码,代码长贴不上,一个页面有2套就冲突,需要改哪些地方能多套滚动? 展开
<div id="jsweb8_cn_left" style="overflow:hidden;width:975px; margin:15px auto;">
<table width="203" height="170" border="0" cellpadding="0" cellspacing="0">
<tr><td width="179" align="center" valign="top" id="jsweb8_cn_left1">
<table width="153" height="178" border="0" cellpadding="2" cellspacing="0">
<tr align="center">
<td height="160"><img src="images/form1.jpg" width="130" height="150" border="0"></td>
<td height="160"><img src="images/form1.jpg" width="130" height="150" border="0"></td>
<td height="160"><img src="images/form1.jpg" width="130" height="150" border="0"></td></tr>
<tr align="center">
<td> </td>
</tr>
</table>
</td>
<td width="24" valign="top" id="jsweb8_cn_left2"></td>
</tr>
</table>
</div>
<script>
var speed=30//速度数值越大速度越慢
jsweb8_cn_left2.innerHTML=jsweb8_cn_left1.innerHTML
function Marquee3(){
if(jsweb8_cn_left2.offsetWidth-jsweb8_cn_left.scrollLeft<=0)
jsweb8_cn_left.scrollLeft-=jsweb8_cn_left1.offsetWidth
else{
jsweb8_cn_left.scrollLeft++
}
}
var MyMar3=setInterval(Marquee3,speed)
jsweb8_cn_left.onmouseover=function() {clearInterval(MyMar3)}
jsweb8_cn_left.onmouseout=function() {MyMar3=setInterval(Marquee3,speed)}
</script>
<!--向左滚动代码结束-->
然后下面再套一模一样的代码,代码长贴不上,一个页面有2套就冲突,需要改哪些地方能多套滚动? 展开
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询