帮我改下这个幻灯片代码,谢谢!

<%rs.Open"select*fromdataorderbyiddesc",conn,3%><script>varwidths=320;varheights=200;... <%rs.Open "select * from data order by id desc",conn,3%>
<script>
var widths=320;
var heights=200;
var counts=4;
<%i=1
do while not rs.eof
%>
img<%=i%>=new Image ();img<%=i%>.src='admin/ShowIMG.asp?id=<%=rs("id")%>'
url<%=i%>=new Image ();url<%=i%>.src='news.asp?id=<%=rs("id")%>'
<%rs.movenext
i=i+1
loop
rs.close%>

var nn=1;
var key=0;
function change_img()
{if(key==0){key=1;}
else if(document.all)
{document.getElementById("pic").filters[0].Apply();document.getElementById("pic").filters[0].Play(duration=2);}
eval('document.getElementById("pic").src=img'+nn+'.src');
eval('document.getElementById("url").href=url'+nn+'.src');
document.getElementById("url").target='_blank';
for (var i=1;i<=counts;i++){document.getElementById("xxjdjj"+i).className='axx';}
document.getElementById("xxjdjj"+nn).className='bxx';
nn++;if(nn>counts){nn=1;}
tt=setTimeout('change_img()',3000);}
function changeimg(n){nn=n;window.clearInterval(tt);change_img();}
document.write('<style>');
document.write('.axx{padding:1px 7px;border-left:#cccccc 1px solid;}');
document.write('a.axx:link,a.axx:visited{text-decoration:none;color:#fff;line-height:12px;font:9px sans-serif;background-color:#666;}');
document.write('a.axx:active,a.axx:hover{text-decoration:none;color:#fff;line-height:12px;font:9px sans-serif;background-color:#999;}');
document.write('.bxx{padding:1px 7px;border-left:#cccccc 1px solid;}');
document.write('a.bxx:link,a.bxx:visited{text-decoration:none;color:#fff;line-height:12px;font:9px sans-serif;background-color:#D34600;}');
document.write('a.bxx:active,a.bxx:hover{text-decoration:none;color:#fff;line-height:12px;font:9px sans-serif;background-color:#D34600;}');
document.write('</style>');
document.write('<div style="width:'+widths+'px;height:'+heights+'px;overflow:hidden;text-overflow:clip;">');
document.write('<div><a id="url"><img id="pic" style="border:0px;filter:progid:dximagetransform.microsoft.wipe(gradientsize=1.0,wipestyle=4, motion=forward)" width='+widths+' height='+heights+' /></a></div>');
document.write('<div style="filter:alpha(style=1,opacity=10,finishOpacity=80);background: #888888;width:100%-2px;text-align:right;top:-12px;position:relative;margin:1px;height:12px;padding:0px;margin:0px;border:0px;">');
for(var i=1;i<counts+1;i++){document.write('<a href="javascript:changeimg('+i+');" id="xxjdjj'+i+'" class="axx" target="_self">'+i+'</a>');}
document.write('</div></div>');
change_img();
</script>

1、我想在下面那个1,2,3,4前面加上文章标题
2、还有,这个文件包含到index的时候1,2,3,4上面的黄色按钮显示不正确,单独的时候没问题

这是地址http://z3341789.gicp.net/
展开
 我来答
wannalcxl
推荐于2016-02-19 · TA获得超过260个赞
知道小有建树答主
回答量:640
采纳率:0%
帮助的人:624万
展开全部
测试ok。

<!--#include file="conn.asp"-->
<%
set rs=server.CreateObject("Adodb.recordset")
sql = "select top 5 * from qq order by babyshow_order asc"
rs.open sql,conn,1,1

'rs.Open "select * from data order by id desc",conn,3
%>
<script language=javascript>
var widths=320;
var heights=200;
var counts=4;
var imgTz=new Array();
<%i=1
do while not rs.eof
%>
img<%=i%>=new Image ();img<%=i%>.src='<%=rs("pic")%>'
url<%=i%>=new Image ();url<%=i%>.src='<%=rs("link")%>'
imgTz[<%=i%>]="<%=rs("name")%>";
<%rs.movenext
i=i+1
loop
rs.close%>

var nn=1;
var key=0;
function change_img()
{if(key==0){key=1;}
else if(document.all)

{document.getElementById("pic").filters[0].Apply();document.getElementById("pic").filters[0].Play(duration=2);}
eval('document.getElementById("txt").innerHTML=imgTz['+nn+']');
eval('document.getElementById("pic").src=img'+nn+'.src');
eval('document.getElementById("url").href=url'+nn+'.src');
document.getElementById("url").target='_blank';

for (var i=1;i<=counts;i++){document.getElementById("xxjdjj"+i).className='axx';}
document.getElementById("xxjdjj"+nn).className='bxx';
nn++;if(nn>counts){nn=1;}
tt=setTimeout('change_img()',3000);}
function changeimg(n){nn=n;window.clearInterval(tt);change_img();}
document.write('<style>');
document.write('.axx{padding:1px 7px;border-left:#cccccc 1px solid;}');
document.write('a.axx:link,a.axx:visited{text-decoration:none;color:#fff;line-height:12px;font:9px sans-serif;background-color:#666;}');
document.write('a.axx:active,a.axx:hover{text-decoration:none;color:#fff;line-height:12px;font:9px sans-serif;background-color:#999;}');
document.write('.bxx{padding:1px 7px;border-left:#cccccc 1px solid;}');
document.write('a.bxx:link,a.bxx:visited{text-decoration:none;color:#fff;line-height:12px;font:9px sans-serif;background-color:#D34600;}');
document.write('a.bxx:active,a.bxx:hover{text-decoration:none;color:#fff;line-height:12px;font:9px sans-serif;background-color:#D34600;}');
document.write('</style>');
document.write('<div style="width:'+widths+'px;height:'+heights+'px;overflow:hidden;text-overflow:clip;">');
document.write('<div><a id="url"><img id="pic" style="border:0px;filter:progid:dximagetransform.microsoft.wipe(gradientsize=1.0,wipestyle=4, motion=forward)" width='+widths+' height='+heights+' /></a></div>');
document.write('<table border="0" cellpadding="0" cellspacing="0" id=newsTable style="position:relative; top:0px;right:0px; font-size:12px;" width=100%>');
document.write('<tr><td style="height:12px; text-align: left;" width=80%><div style="filter:alpha(style=1,opacity=80,finishOpacity=80);background: #888888;width:100%-2px;text-align:left;top:-12px;position:relative;margin:0px;height:18px;padding:0px;margin:0px;border:0px;"><span id="txt"></span></div></td>');
document.write('<td><div style="filter:alpha(style=1,opacity=80,finishOpacity=80);background: #888888;width:100%-2px;text-align:right;top:-12px;position:relative;margin:0px;height:18px;padding:0px;margin:0px;border:0px;">');
for(var i=1;i<counts+1;i++){document.write('<a href="javascript:changeimg('+i+');" id="xxjdjj'+i+'" class="axx" target="_self">'+i+'</a>');}
document.write('</div></td></tr></table></div>');
change_img();
</script>
本回答被提问者采纳
已赞过 已踩过<
你对这个回答的评价是?
评论 收起
博思aippt
2024-07-20 广告
作为深圳市博思云创科技有限公司的工作人员,对于Word文档生成PPT的操作,我们有以下建议:1. 使用另存为功能:在Word中编辑完文档后,点击文件->另存为,选择PowerPoint演示文稿(*.pptx)格式,即可将文档内容转换为PPT... 点击进入详情页
本回答由博思aippt提供
推荐律师服务: 若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询

为你推荐:

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

类别

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

说明

0/200

提交
取消

辅 助

模 式