图片滚动代码(各个频道、向左、向右、向上滚动)代码
作者:小柳 日期:2007-03-30
一、向左滚动
1、调用“图片”栏目图片的向左滚动代码。
以下是首页模板最新图片部分代码
-----------------------------------
<tr>
<td class=main_title_575><B>最新图片</B></td>
</tr>
<tr>
<td class=main_tdbg_575 vAlign=center align=middle height=131>
<!--{$GetPicPhoto(3,0,True,0,4,False,False,0,1,1,130,90,20,0,True,4)}--> </td>
</tr>
------------------------------------
用以下是滚动代码代替上面红色的标签部分,注意红色部分的变化。
------------------------------------
<!--滚动代码开始-->
<div id=demo style="OVERFLOW: hidden; WIDTH: 560px; HEIGHT: 120px">
<table cellPadding=0 align=left border=0 cellspace="0">
<tr>
<td id=demo11 vAlign=top>
<!--{$GetPicPhoto(3,0,True,0,12,False,False,0,1,1,130,90,20,0,True,12)}--></td>
<td id=demo12 vAlign=top></td>
</tr>
</table>
</div>
<SCRIPT>
var speed=15
demo12.innerHTML=demo11.innerHTML
function Marquee11(){
if(demo12.offsetWidth-demo.scrollLeft<=0)
demo.scrollLeft-=demo11.offsetWidth
else{
demo.scrollLeft++
}
}
var MyMar1=setInterval(Marquee11,speed)
demo.onmouseover=function() {clearInterval(MyMar1)}
demo.onmouseout=function() {MyMar1=setInterval(Marquee11,speed)}
</SCRIPT>
<!--滚动代码结束-->
-----------------------------------
2、文章频道图片向左滚动代码。
以下是文章频道模板最新图片部分代码
-----------------------------------
<tr>
<td Class="main_title_575"><b>最新图片{$ChannelShortName}</b></td>
</tr>
<tr>
<td Class="main_tdbg_575"> {$GetPicArticle(ChannelID,0,True,0,4,false,false,0,3,2,130,90,20,0,True,4)} </td>
</tr>
<tr>
<td Class="main_shadow"></td>
</tr>
------------------------------------
用以下是滚动代码代替上面红色的标签,注意红色部分的变化。红色数字代表了滚动图片的总数(这里为8张)。
----------------------------------
<!--滚动代码开始-->
<div id=demo style="OVERFLOW: hidden; WIDTH: 560px; HEIGHT: 120px">
<table cellPadding=0 align=left border=0 cellspace="0">
<tr>
<td id=demo11 vAlign=top>
<!--{$GetPicArticle(ChannelID,0,True,0,8,false,false,0,3,2,130,90,20,0,True,8)}--></td>
<td id=demo12 vAlign=top></td>
</tr>
</table>
</div>
<SCRIPT>
var speed=15
demo12.innerHTML=demo11.innerHTML
function Marquee11(){
if(demo12.offsetWidth-demo.scrollLeft<=0)
demo.scrollLeft-=demo11.offsetWidth
else{
demo.scrollLeft++
}
}
var MyMar1=setInterval(Marquee11,speed)
demo.onmouseover=function() {clearInterval(MyMar1)}
demo.onmouseout=function() {MyMar1=setInterval(Marquee11,speed)}
</SCRIPT>
<!--滚动代码结束-->
-----------------------------------
3、下载频道图片向左滚动代码。
以下是下载频道模板推荐下载图片部分代码
-----------------------------------
<tr>
<td Class="main_title_575"><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><b><a class='Class' href="{$InstallDir}{$ChannelDir}/ShowElite.asp">推荐下载(图)</a></b></td>
<td align="right">{$RssElite}</td>
</tr>
</table></td>
</tr>
<tr>
<td align="center" Class="main_tdbg_575"> {$GetPicSoft(ChannelID,0,True,0,4,false,True,0,3,2,130,90,20,0,True,4)} </td>
</tr>
------------------------------------
用以下是滚动代码代替上面红色的标签,注意红色部分的变化。红色数字代表了滚动图片的总数(这里为12张)。
------------------------------------
<!--滚动代码开始-->
<div id=demo style="OVERFLOW: hidden; WIDTH: 560px; HEIGHT: 120px">
<table cellPadding=0 align=left border=0 cellspace="0">
<tr>
<td id=demo11 vAlign=top>
<!--{$GetPicSoft(ChannelID,0,True,0,12,false,True,0,3,2,130,90,20,0,True,12)}--></td>
<td id=demo12 vAlign=top></td>
</tr>
</table>
</div>
<SCRIPT>
var speed=15
demo12.innerHTML=demo11.innerHTML
function Marquee11(){
if(demo12.offsetWidth-demo.scrollLeft<=0)
demo.scrollLeft-=demo11.offsetWidth
else{
demo.scrollLeft++
}
}
var MyMar1=setInterval(Marquee11,speed)
demo.onmouseover=function() {clearInterval(MyMar1)}
demo.onmouseout=function() {MyMar1=setInterval(Marquee11,speed)}
</SCRIPT>
<!--滚动代码结束-->
------------------------------
从以上可以看出,滚动图片代码基本上是相同的,不同的是调用图片的标签变了。
------------------------------
二、向上滚动
向上滚动代码使用方法同上左滚动代码,这里只给出代码,不再说明。
以下是文章频道图片调用的滚动代码。
-----------------------------------------------------------
<!--向上滚动代码开始-->
<DIV id=rolllink style="OVERFLOW: hidden; WIDTH: 160px; HEIGHT: 360px">
<DIV id=rolllink1>
<TABLE cellSpacing=5 width="100%">
<tr>
<td id=demo11 vAlign=top>
<!--{$GetPicArticle(0,0,True,0,6,false,false,0,3,2,160,100,20,0,True,1)}--> </td>
<td id=demo12 vAlign=top></td>
</tr>
</TABLE>
</DIV>
<DIV id=rolllink2></DIV>
</DIV>
<SCRIPT>
var rollspeed=40
rolllink2.innerHTML=rolllink1.innerHTML
function Marquee(){
if(rolllink2.offsetTop-rolllink.scrollTop<=0)
rolllink.scrollTop-=rolllink1.offsetHeight
else{
rolllink.scrollTop++
}
}
var MyMar=setInterval(Marquee,rollspeed)
rolllink.onmouseover=function() {clearInterval(MyMar)}
rolllink.onmouseout=function() {MyMar=setInterval(Marquee,rollspeed)}
</SCRIPT>
<!--向上滚动代码结束-->
-----------------------------------------------------------
以下是图片频道的3行4列向上滚动代码摘录。
………………………
<tr>
<td colspan="3" Class="main_title_575"><a class="Class" href="{$InstallDir}{$ChannelDir}/ShowNew.asp"><b>最新{$ChannelShortName}</b></a></td>
</tr>
<tr valign="top">
<td colspan="3"><table width="100%" border="0" cellspacing="0" cellpadding="0" Class="main_tdbg_575">
<tr>
<td height="200" valign="top">
<!--向上滚动代码开始-->
<DIV id=rolllink style="OVERFLOW: hidden; WIDTH: 575px; HEIGHT: 365px">
<DIV id=rolllink1>
<TABLE cellSpacing=5 width="100%">
<tr>
<td id=demo11 vAlign=top>
<!--{$GetPicPhoto(ChannelID,0,True,0,24,False,False,0,1,1,130,90,20,0,True, 4)}--></td>
<td id=demo12 vAlign=top></td>
</tr>
</TABLE>
</DIV>
<DIV id=rolllink2></DIV>
</DIV>
<SCRIPT>
var rollspeed=40
rolllink2.innerHTML=rolllink1.innerHTML
function Marquee(){
if(rolllink2.offsetTop-rolllink.scrollTop<=0)
rolllink.scrollTop-=rolllink1.offsetHeight
else{
rolllink.scrollTop++
}
}
var MyMar=setInterval(Marquee,rollspeed)
rolllink.onmouseover=function() {clearInterval(MyMar)}
rolllink.onmouseout=function() {MyMar=setInterval(Marquee,rollspeed)}
</SCRIPT>
<!--向上滚动代码结束-->
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td colspan="3" Class="main_shadow"></td>
</tr>
…………………………
三、向右滚动
--------------------------------------
<!--向右滚动代码开始-->
<div id=demo style=overflow:hidden;height:120;width:560;>
<table align=left cellpadding=0 cellspace=0 border=0>
<tr>
<td id=demo1 valign=top><!--{$GetPicPhoto(3,0,True,0,12,False,False,0,1,1,130,90,20,0,True,12)}--></td>
<td id=demo2 valign=top></td>
</tr>
</table>
</div>
<script>
var speed=30
demo2.innerHTML=demo1.innerHTML
demo.scrollLeft=demo.scrollWidth
function Marquee(){
if(demo.scrollLeft<=0)
demo.scrollLeft+=demo2.offsetWidth
else{
demo.scrollLeft--
}
}
var MyMar=setInterval(Marquee, speed)
demo.onmouseover=function() {clearInterval(MyMar)}
demo.onmouseout=function() {MyMar=setInterval(Marquee, speed)}
</script>
<!--向右滚动代码结束-->
1、调用“图片”栏目图片的向左滚动代码。
以下是首页模板最新图片部分代码
-----------------------------------
<tr>
<td class=main_title_575><B>最新图片</B></td>
</tr>
<tr>
<td class=main_tdbg_575 vAlign=center align=middle height=131>
<!--{$GetPicPhoto(3,0,True,0,4,False,False,0,1,1,130,90,20,0,True,4)}--> </td>
</tr>
------------------------------------
用以下是滚动代码代替上面红色的标签部分,注意红色部分的变化。
------------------------------------
<!--滚动代码开始-->
<div id=demo style="OVERFLOW: hidden; WIDTH: 560px; HEIGHT: 120px">
<table cellPadding=0 align=left border=0 cellspace="0">
<tr>
<td id=demo11 vAlign=top>
<!--{$GetPicPhoto(3,0,True,0,12,False,False,0,1,1,130,90,20,0,True,12)}--></td>
<td id=demo12 vAlign=top></td>
</tr>
</table>
</div>
<SCRIPT>
var speed=15
demo12.innerHTML=demo11.innerHTML
function Marquee11(){
if(demo12.offsetWidth-demo.scrollLeft<=0)
demo.scrollLeft-=demo11.offsetWidth
else{
demo.scrollLeft++
}
}
var MyMar1=setInterval(Marquee11,speed)
demo.onmouseover=function() {clearInterval(MyMar1)}
demo.onmouseout=function() {MyMar1=setInterval(Marquee11,speed)}
</SCRIPT>
<!--滚动代码结束-->
-----------------------------------
2、文章频道图片向左滚动代码。
以下是文章频道模板最新图片部分代码
-----------------------------------
<tr>
<td Class="main_title_575"><b>最新图片{$ChannelShortName}</b></td>
</tr>
<tr>
<td Class="main_tdbg_575"> {$GetPicArticle(ChannelID,0,True,0,4,false,false,0,3,2,130,90,20,0,True,4)} </td>
</tr>
<tr>
<td Class="main_shadow"></td>
</tr>
------------------------------------
用以下是滚动代码代替上面红色的标签,注意红色部分的变化。红色数字代表了滚动图片的总数(这里为8张)。
----------------------------------
<!--滚动代码开始-->
<div id=demo style="OVERFLOW: hidden; WIDTH: 560px; HEIGHT: 120px">
<table cellPadding=0 align=left border=0 cellspace="0">
<tr>
<td id=demo11 vAlign=top>
<!--{$GetPicArticle(ChannelID,0,True,0,8,false,false,0,3,2,130,90,20,0,True,8)}--></td>
<td id=demo12 vAlign=top></td>
</tr>
</table>
</div>
<SCRIPT>
var speed=15
demo12.innerHTML=demo11.innerHTML
function Marquee11(){
if(demo12.offsetWidth-demo.scrollLeft<=0)
demo.scrollLeft-=demo11.offsetWidth
else{
demo.scrollLeft++
}
}
var MyMar1=setInterval(Marquee11,speed)
demo.onmouseover=function() {clearInterval(MyMar1)}
demo.onmouseout=function() {MyMar1=setInterval(Marquee11,speed)}
</SCRIPT>
<!--滚动代码结束-->
-----------------------------------
3、下载频道图片向左滚动代码。
以下是下载频道模板推荐下载图片部分代码
-----------------------------------
<tr>
<td Class="main_title_575"><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><b><a class='Class' href="{$InstallDir}{$ChannelDir}/ShowElite.asp">推荐下载(图)</a></b></td>
<td align="right">{$RssElite}</td>
</tr>
</table></td>
</tr>
<tr>
<td align="center" Class="main_tdbg_575"> {$GetPicSoft(ChannelID,0,True,0,4,false,True,0,3,2,130,90,20,0,True,4)} </td>
</tr>
------------------------------------
用以下是滚动代码代替上面红色的标签,注意红色部分的变化。红色数字代表了滚动图片的总数(这里为12张)。
------------------------------------
<!--滚动代码开始-->
<div id=demo style="OVERFLOW: hidden; WIDTH: 560px; HEIGHT: 120px">
<table cellPadding=0 align=left border=0 cellspace="0">
<tr>
<td id=demo11 vAlign=top>
<!--{$GetPicSoft(ChannelID,0,True,0,12,false,True,0,3,2,130,90,20,0,True,12)}--></td>
<td id=demo12 vAlign=top></td>
</tr>
</table>
</div>
<SCRIPT>
var speed=15
demo12.innerHTML=demo11.innerHTML
function Marquee11(){
if(demo12.offsetWidth-demo.scrollLeft<=0)
demo.scrollLeft-=demo11.offsetWidth
else{
demo.scrollLeft++
}
}
var MyMar1=setInterval(Marquee11,speed)
demo.onmouseover=function() {clearInterval(MyMar1)}
demo.onmouseout=function() {MyMar1=setInterval(Marquee11,speed)}
</SCRIPT>
<!--滚动代码结束-->
------------------------------
从以上可以看出,滚动图片代码基本上是相同的,不同的是调用图片的标签变了。
------------------------------
二、向上滚动
向上滚动代码使用方法同上左滚动代码,这里只给出代码,不再说明。
以下是文章频道图片调用的滚动代码。
-----------------------------------------------------------
<!--向上滚动代码开始-->
<DIV id=rolllink style="OVERFLOW: hidden; WIDTH: 160px; HEIGHT: 360px">
<DIV id=rolllink1>
<TABLE cellSpacing=5 width="100%">
<tr>
<td id=demo11 vAlign=top>
<!--{$GetPicArticle(0,0,True,0,6,false,false,0,3,2,160,100,20,0,True,1)}--> </td>
<td id=demo12 vAlign=top></td>
</tr>
</TABLE>
</DIV>
<DIV id=rolllink2></DIV>
</DIV>
<SCRIPT>
var rollspeed=40
rolllink2.innerHTML=rolllink1.innerHTML
function Marquee(){
if(rolllink2.offsetTop-rolllink.scrollTop<=0)
rolllink.scrollTop-=rolllink1.offsetHeight
else{
rolllink.scrollTop++
}
}
var MyMar=setInterval(Marquee,rollspeed)
rolllink.onmouseover=function() {clearInterval(MyMar)}
rolllink.onmouseout=function() {MyMar=setInterval(Marquee,rollspeed)}
</SCRIPT>
<!--向上滚动代码结束-->
-----------------------------------------------------------
以下是图片频道的3行4列向上滚动代码摘录。
………………………
<tr>
<td colspan="3" Class="main_title_575"><a class="Class" href="{$InstallDir}{$ChannelDir}/ShowNew.asp"><b>最新{$ChannelShortName}</b></a></td>
</tr>
<tr valign="top">
<td colspan="3"><table width="100%" border="0" cellspacing="0" cellpadding="0" Class="main_tdbg_575">
<tr>
<td height="200" valign="top">
<!--向上滚动代码开始-->
<DIV id=rolllink style="OVERFLOW: hidden; WIDTH: 575px; HEIGHT: 365px">
<DIV id=rolllink1>
<TABLE cellSpacing=5 width="100%">
<tr>
<td id=demo11 vAlign=top>
<!--{$GetPicPhoto(ChannelID,0,True,0,24,False,False,0,1,1,130,90,20,0,True, 4)}--></td>
<td id=demo12 vAlign=top></td>
</tr>
</TABLE>
</DIV>
<DIV id=rolllink2></DIV>
</DIV>
<SCRIPT>
var rollspeed=40
rolllink2.innerHTML=rolllink1.innerHTML
function Marquee(){
if(rolllink2.offsetTop-rolllink.scrollTop<=0)
rolllink.scrollTop-=rolllink1.offsetHeight
else{
rolllink.scrollTop++
}
}
var MyMar=setInterval(Marquee,rollspeed)
rolllink.onmouseover=function() {clearInterval(MyMar)}
rolllink.onmouseout=function() {MyMar=setInterval(Marquee,rollspeed)}
</SCRIPT>
<!--向上滚动代码结束-->
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td colspan="3" Class="main_shadow"></td>
</tr>
…………………………
三、向右滚动
--------------------------------------
<!--向右滚动代码开始-->
<div id=demo style=overflow:hidden;height:120;width:560;>
<table align=left cellpadding=0 cellspace=0 border=0>
<tr>
<td id=demo1 valign=top><!--{$GetPicPhoto(3,0,True,0,12,False,False,0,1,1,130,90,20,0,True,12)}--></td>
<td id=demo2 valign=top></td>
</tr>
</table>
</div>
<script>
var speed=30
demo2.innerHTML=demo1.innerHTML
demo.scrollLeft=demo.scrollWidth
function Marquee(){
if(demo.scrollLeft<=0)
demo.scrollLeft+=demo2.offsetWidth
else{
demo.scrollLeft--
}
}
var MyMar=setInterval(Marquee, speed)
demo.onmouseover=function() {clearInterval(MyMar)}
demo.onmouseout=function() {MyMar=setInterval(Marquee, speed)}
</script>
<!--向右滚动代码结束-->
评论: 17 | 引用: 575 | 查看次数: 3450
发表评论