这是一段点击按钮图片才左右移动的asp代码,如何更改使他默认为左移动的

这是一段点击按钮图片才左右移动的asp代码,如何更改使他默认为左移动的:<tdalign="right"width="9"><imgsrc="{$csspicurl}Le... 这是一段点击按钮图片才左右移动的asp代码,如何更改使他默认为左移动的:
<td align="right" width="9"><img src="{$csspicurl}Left_button.gif" name="Left" id="Left" style="CURSOR: hand" /></td>
<td><div id="demo" style="OVERFLOW: hidden; WIDTH: 520px" align="center">
<table cellpadding="0" width="98%" align="center" border="0" cellspace="0">
<tr>
<td id="demo1" valign="top"><table cellspacing="0" cellpadding="0" width="100%" border="0">
<tr>
<td align="middle"><div class=img_framed>{$Showpicarticle(0,0,0,10,10,0,15,120,90,200,False,False)}</div></td>
</tr>
</table></td>
<td id="demo2" valign="top"></td>
</tr>
</table>
</div></td>
<td width="9"><img id="right" style="CURSOR: hand" src="{$csspicurl}Rigth_button.gif" name="right" /></td>
</tr>
</table>
<input name="hidden" type="hidden" id="direction" value="0" />
<script>
var speed=30;
demo2.innerHTML=demo1.innerHTML
</script>
<script language="JavaScript" type="text/javascript" event="onclick" for="right">
demo.scrollLeft=0;
demo.scrollLeft=demo.scrollWidth
document.all["direction"].value = "MarqueeRight";
</script>
<script language="JavaScript" type="text/javascript" event="onclick" for="Left">
demo.scrollLeft=0;
document.all["direction"].value = "MarqueeLeft";
</script>
<script>
function Marquee(){
if(document.all["direction"].value=="MarqueeRight")
{
if(demo.scrollLeft<=0)
demo.scrollLeft+=demo2.offsetWidth
else{
demo.scrollLeft--
}
}
else if(document.all["direction"].value=="MarqueeLeft")
{
if(demo2.offsetWidth-demo.scrollLeft<=0)
demo.scrollLeft-=demo1.offsetWidth
else{
demo.scrollLeft++
}
}
}
var MyMar=setInterval(Marquee,speed)
demo.onmouseover=function() {clearInterval(MyMar)}
demo.onmouseout=function() {MyMar=setInterval(Marquee,speed)}
</script>
</td>
</tr>
</table>
展开
 我来答
abill425
推荐于2016-03-29 · TA获得超过1726个赞
知道小有建树答主
回答量:663
采纳率:100%
帮助的人:1082万
展开全部
替换成下面这些就可以了:

<td align="right" width="9"><img src="{$csspicurl}Left_button.gif" name="Left" id="Left" style="CURSOR: hand" /></td>
<td><div id="demo" style="OVERFLOW: hidden; WIDTH: 520px" align="center">
<table cellpadding="0" width="98%" align="center" border="0" cellspace="0">
<tr>
<td id="demo1" valign="top"><table cellspacing="0" cellpadding="0" width="100%" border="0">
<tr>
<td align="middle"><div class=img_framed>{$Showpicarticle(0,0,0,10,10,0,15,120,90,200,False,False)}</div></td>
</tr>
</table></td>
<td id="demo2" valign="top"></td>
</tr>
</table>
</div></td>
<td width="9"><img id="right" style="CURSOR: hand" src="{$csspicurl}Rigth_button.gif" name="right" /></td>
</tr>
</table>
<input name="hidden" type="hidden" id="direction" value="0" />
<script>
demo.scrollLeft=0;
document.all["direction"].value = "MarqueeLeft";
</script>
<script>
var speed=30;
demo2.innerHTML=demo1.innerHTML
</script>
<script language="JavaScript" type="text/javascript" event="onclick" for="right">
demo.scrollLeft=0;
demo.scrollLeft=demo.scrollWidth
document.all["direction"].value = "MarqueeRight";
</script>
<script language="JavaScript" type="text/javascript" event="onclick" for="Left">
demo.scrollLeft=0;
document.all["direction"].value = "MarqueeLeft";
</script>
<script>
function Marquee(){
if(document.all["direction"].value=="MarqueeRight")
{
if(demo.scrollLeft<=0)
demo.scrollLeft+=demo2.offsetWidth
else{
demo.scrollLeft--
}
}
else if(document.all["direction"].value=="MarqueeLeft")
{
if(demo2.offsetWidth-demo.scrollLeft<=0)
demo.scrollLeft-=demo1.offsetWidth
else{
demo.scrollLeft++
}
}
}
var MyMar=setInterval(Marquee,speed)
demo.onmouseover=function() {clearInterval(MyMar)}
demo.onmouseout=function() {MyMar=setInterval(Marquee,speed)}
</script>
</td>
</tr>
</table>
本回答被提问者采纳
已赞过 已踩过<
你对这个回答的评价是?
评论 收起
推荐律师服务: 若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询

为你推荐:

下载百度知道APP,抢鲜体验
使用百度知道APP,立即抢鲜体验。你的手机镜头里或许有别人想知道的答案。
扫描二维码下载
×

类别

我们会通过消息、邮箱等方式尽快将举报结果通知您。

说明

0/200

提交
取消

辅 助

模 式