将现成的上下滚动特效改成左右滚动特效,不会,泪奔中T_T~~~~~~[特别求助]

yhyynh1986 2009-11-20 04:20:49
这些代码可复制可运行,希望各位大虾能帮我改一下,不弟不甚感激!


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>Partner</title>
<style type="text/css">
<!--
body {
margin-left: 0px;
margin-top: 0px;
margin-right: 0px;
margin-bottom: 0px;
background-color: #eaeaea;
}
-->
</style></head>

<body>
<table width="165" border="0" cellpadding="0" cellspacing="0">
<tr>
<td>
<table width="160" border="0" cellspacing="0" align="center">
<tr>
<td>
<div id="EPA1" style="width:160;">
<TABLE cellSpacing="0" cellPadding="0" width="160" border="0">
<tr><td height=47 align=center>
<a href="http://www.teamsun.com.cn/" target="_blank">
<img src="/images/Teamsun_logo.gif" width="151" height="42" border="0"></a>
</td>
</tr>
<tr><td height=47 align=center>
<a href="http://sh.delteq.com.cn" target="_blank">
<img src="/images/delteq_logo151.gif" width="151" height="42" border="0"></a>
</td>
</tr>
<tr><td height=47 align=center>
<a href="http://www.digitalchina.com/" target="_blank">
<img src="/images/dc_logo.gif" width="151" height="42" border="0"></a>
</td>
</tr>
</TABLE>
</div>
<div id="EPA2" style="position:absolute;z-index:1;visibility:hidden"></div>
</td></tr>
</table>
</td ></tr>
<script>
articleHeight=141;
stopscrolla=false;
EPA1.scrollTop=0;
with(EPA1){
style.width=0;
style.height=articleHeight;
style.overflowX="visible";
style.overflowY="hidden";
noWrap=true;
onmouseover=new Function("stopscrolla=true");
onmouseout=new Function("stopscrolla=false");
}

preTopa=0; currentTopa=0; stoptimea=0;

function init_srolltext1(){
EPA2.innerHTML="";
EPA2.innerHTML+=EPA1.innerHTML;
EPA1.innerHTML=EPA2.innerHTML+EPA2.innerHTML;
setInterval("scrollUp1()",42);
}
function scrollUp1(){
if(stopscrolla==true) return;
currentTopa+=1;
if(currentTopa==48)
{
stoptimea+=1;
currentTopa-=1;
if(stoptimea==42)
{
currentTopa=0;
stoptimea=0;
}
}
else {
preTopa=EPA1.scrollTop;
EPA1.scrollTop+=1;
if(preTopa==EPA1.scrollTop){
EPA1.scrollTop=EPA2.offsetHeight-articleHeight;
EPA1.scrollTop+=1;
}
}

}
init_srolltext1();
</script>
</table>
</body>
</html>
...全文
62 1 打赏 收藏 转发到动态 举报
写回复
用AI写文章
1 条回复
切换为时间正序
请发表友善的回复…
发表回复
打字员 2009-11-20
  • 打赏
  • 举报
回复
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3c.org/TR/1999/REC-html401-19991224/loose.dtd">
<HTML xmlns="http://www.w3.org/1999/xhtml">
<HEAD>
<TITLE>CSDN Demo</TITLE>
<META http-equiv=Content-Type content="text/html; charset=utf-8">
<STYLE type=text/css>
<!--
body {
margin:0;
background:#eaeaea;
}
-->
</STYLE>
<script language="javascript">

</script>
</HEAD>
<BODY>
<table width="165" border="0" cellpadding="0" cellspacing="0">
<tr>
<td><table width="160" border="0" cellspacing="0" align="center">
<tr>
<td>
<div id="EPA1" style="width:151px;">
<a href="http://www.teamsun.com.cn/" target="_blank"> <img src="http://www.baidu.com/img/baidu_logo.gif" width="151" height="42" border="0" alt="1"> </a><a href="http://sh.delteq.com.cn" target="_blank"> <img src="http://www.baidu.com/img/baidu_logo.gif" width="151" height="42" border="0"alt="2"> </a><a href="http://www.digitalchina.com/" target="_blank"> <img src="http://www.baidu.com/img/baidu_logo.gif" width="151" height="42" border="0" alt="3"> </a>
</div>
<div id="EPA2" style="position:absolute;z-index:1;visibility:hidden"> </div></td>
</tr>
</table></td >
</tr>
</table>
<script>
articleWidth=453;
stopscrolla=false;
document.getElementById("EPA1").scrollTop=0;
with(document.getElementById("EPA1")){
style.height="47px";
style.width=articleWidth+"px";
style.overflow="hidden";
noWrap=true;
onmouseover=new Function("stopscrolla=true");
onmouseout=new Function("stopscrolla=false");
}

preTopa=0; currentTopa=0; stoptimea=0;

function init_srolltext1(){
document.getElementById("EPA2").innerHTML="";
document.getElementById("EPA2").innerHTML+=document.getElementById("EPA1").innerHTML;
document.getElementById("EPA1").innerHTML=document.getElementById("EPA2").innerHTML+document.getElementById("EPA2").innerHTML;
setInterval("scrollUp1()",10);
}
function scrollUp1(){
if(stopscrolla==true) return;
currentTopa+=1;
if(currentTopa==151)
{
stoptimea+=1;
currentTopa-=1;
if(stoptimea==151)
{
currentTopa=0;
stoptimea=0;
}
}
else {
preTopa=document.getElementById("EPA1").scrollLeft;
document.getElementById("EPA1").scrollLeft+=1;
if(preTopa==document.getElementById("EPA1").scrollLeft){
document.getElementById("EPA1").scrollLeft=document.getElementById("EPA2").offsetWidth-articleWidth;
document.getElementById("EPA1").scrollLeft+=1;
}
}

}
init_srolltext1();
</script>
<script language='javascript'>

</script>
</BODY>
</HTML>

87,994

社区成员

发帖
与我相关
我的任务
社区描述
Web 开发 JavaScript
社区管理员
  • JavaScript
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧