📄 srollimges.asp
字号:
<%
'//定义变量
dim gg_B_1,gg_B_2,gg_B_3,gg_B_4,gg_B_5,gg_B_6,gg_B_1_url,gg_B_2_url,gg_B_3_url,gg_B_4_url,gg_B_5_url,gg_B_6_url
'//打开B区广告
set rs=server.CreateObject("adodb.recordset")
rs.open "select * from shop_ggpic where ggpicposi='B' order by picaddate desc",conn,1,1
gg_B_1=trim(rs("ggpicpath"))
gg_B_1_url=trim(rs("ggpicurl"))
'//逐条读取记录
rs.movenext
gg_B_2=trim(rs("ggpicpath"))
gg_B_2_url=trim(rs("ggpicurl"))
rs.movenext
gg_B_3=trim(rs("ggpicpath"))
gg_B_3_url=trim(rs("ggpicurl"))
rs.movenext
gg_B_4=trim(rs("ggpicpath"))
gg_B_4_url=trim(rs("ggpicurl"))
rs.movenext
gg_B_5=trim(rs("ggpicpath"))
gg_B_5_url=trim(rs("ggpicurl"))
rs.movenext
gg_B_6=trim(rs("ggpicpath"))
gg_B_6_url=trim(rs("ggpicurl"))
rs.close
set rs=nothing
%>
<!--广告-->
<script LANGUAGE='JavaScript'>
document.ns = navigator.appName == "Microsoft Internet Explorer";
function showStr(str,textWidth,num)
{ if(!document.ns)
{
document.write(str[0]+'<br>')
}
else
{
var wrt="";
wrt+='<table border=0 align=center cellspacing=0 cellpadding=0>';
wrt+='<tr><td>';
wrt+='<div id="icefable1'+num+'">';
wrt+='<table width='+textWidth+' border=0 align=center cellspacing=0 cellpadding=0>';
for (var i in str)
{
wrt+='<tr><td height=20>'+str[i]+'</td></tr>';
}
scroll_num=i;
wrt+='</table>';
wrt+='</div>';
wrt+='<div id="icefable2'+num+'" style="position:absolute;z-index:1;visibility:hidden"></div>';
wrt+='</td></tr>';
wrt+='</table>';
document.write(wrt);
}
}
function init_srolltext(num)
{
countnum=0;
eval('stopscroll'+num+'=false;');
eval('icefable1'+num+'.scrollTop=0;');
rotatenum=0;
eval('icefable1'+num+'.style.width=0;');
eval('icefable1'+num+'.style.height=marqueesHeight;');
eval('icefable1'+num+'.style.overflowX="visible";');
eval('icefable1'+num+'.style.overflowY="hidden";');
eval('icefable1'+num+'.noWrap=true;');
eval('icefable1'+num+'.onmouseover=new Function("stopscroll=true");');
eval('icefable1'+num+'.onmouseout=new Function("stopscroll=false");');
eval('preTop'+num+'=0; ');
eval('currentTop'+num+'=0;');
eval('stoptime'+num+'=0;');
eval('icefable2'+num+'.innerHTML="";');
eval('icefable2'+num+'.innerHTML+=icefable1'+num+'.innerHTML;');
eval('icefable1'+num+'.innerHTML=icefable2'+num+'.innerHTML+icefable2'+num+'.innerHTML;');
eval('setInterval("scrollUp'+num+'()",40);');
}
function scrollUp1()
{ if(stopscroll1==true) return;
currentTop1+=1;
if(currentTop1==marqueesHeight+1)
{
stoptime1+=1;
currentTop1-=1;
if(stoptime1==scrolllen*marqueesHeight)
{
currentTop1=0;
stoptime1=0;
}
}
else
{
preTop1=icefable11.scrollTop;
icefable11.scrollTop+=1;
if(icefable11.scrollTop==scrolllen*marqueesHeight+1)
{
preTop1=0;
currentTop1=0;
stoptime1=0;
icefable11.scrollTop=0;
}
}
}
var strArray1=new Array();
strArray1[0]='<a href=<%=gg_B_1_url%> target=_blank><img border=0 src=<%=gg_B_1%> height=70 width=254></a><a href=<%=gg_B_2_url%> target=_blank><img border=0 src=<%=gg_B_2%> height=70 width=254></a><a href=<%=gg_B_3_url%> target=_blank><img border=0 src=<%=gg_B_3%> height=70 width=254></a>';
strArray1[1]='<a href=<%=gg_B_4_url%> target=_blank><img border=0 src=<%=gg_B_4%> height=70 width=254></a><a href=<%=gg_B_5_url%> target=_blank><img border=0 src=<%=gg_B_5%> height=70 width=254></a><a href=<%=gg_B_6_url%> target=_blank><img border=0 src=<%=gg_B_6%> height=70 width=254></a>';
var scrolllen=strArray1.length;
marqueesHeight=70;
showStr(strArray1,580,1);
init_srolltext(1);
</script>
<!--广告-->
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -