调用数据库图片 JS 显示问题

maituo maituo 墨衍会员 · AI 创作全网分发 墨衍智能分发 通过墨衍一键同步至各平台 可同步平台 CSDN微信公众号微博知乎掘金百家号博客园抖音小红书 你的文章也可以这样分发 墨衍会员 ¥399起/年,写一次发全网 我也要 + 加入社区
现在循环显示6个图片 我现在没有限制 为什么显示6个??



<script language="JavaScript">
<!--
function objSP_Article() {this.ImgUrl=""; this.LinkUrl=""; this.Title="";}
function SlidePic_Article(_id) {this.ID=_id; this.Width=0;this.Height=0; this.TimeOut=5000; this.Effect=23; this.TitleLen=0; this.PicNum=-1; this.Img=null; this.Url=null; this.Title=null; this.AllPic=new Array(); this.Add=SlidePic_Article_Add; this.Show=SlidePic_Article_Show; this.LoopShow=SlidePic_Article_LoopShow;}
function SlidePic_Article_Add(_SP) {this.AllPic[this.AllPic.length] = _SP;}
function SlidePic_Article_Show() {
if(this.AllPic[0] == null) return false;
document.write("<div align='left'><a id='Url_" + this.ID + "' target='_blank' href='' ><img id='Img_" + this.ID + "' style='width:" + this.Width + "; height:" + this.Height + "; filter: revealTrans(duration=2,transition=23);' src='javascript:null' border='0'></a>");
if(this.TitleLen != 0) document.write("<br><span id='Title_" + this.ID + "'></span></div>");
this.Img = document.getElementById("Img_" + this.ID);
this.Url = document.getElementById("Url_" + this.ID);
this.Title = document.getElementById("Title_" + this.ID);
this.LoopShow();
}
function SlidePic_Article_LoopShow() {
if(this.PicNum<this.AllPic.length-1) this.PicNum++ ;
else this.PicNum=0;
this.Img.filters.revealTrans.Transition=this.Effect;
this.Img.filters.revealTrans.apply();
this.Img.src=this.AllPic[this.PicNum].ImgUrl;
this.Img.filters.revealTrans.play();
this.Url.href=this.AllPic[this.PicNum].LinkUrl;
if(this.Title) this.Title.innerHTML="<a href="+this.AllPic[this.PicNum].LinkUrl+" target=_blank>"+this.AllPic[this.PicNum].Title+"</a>";
this.Img.timer=setTimeout(this.ID+".LoopShow()",this.TimeOut);
}
//-->
</script>
<script language=JavaScript>
var SlidePic_990 = new SlidePic_Article("SlidePic_990");
SlidePic_990.Width = 305;
SlidePic_990.Height = 220;
SlidePic_990.TimeOut = 5000;
SlidePic_990.Effect = 23;
SlidePic_990.TitleLen = 30;
</script>
<a href="3" target="_blank">
<%
sql1= "select * from new_pic where type='flash图片' and xs='1' "'这里自己写 下面的自己换下就行了
set rs1 =server.CreateObject("ADODB.Recordset")
rs1.open sql1,conn
%>
<%


bb=0
do while not rs1.eof
if len(rs1("content"))>120 then
biaot= "<br>" & left(rs1("content"),120)&"…"
else
biaot=rs1("head")
end if'if len(rs("head"))>17 then


%>



<%
a="<script language=JavaScript>"& chr(10) &_
"var oSP = new objSP_Article();" & chr(10) &_
"oSP.ImgUrl = """&"newsimage/" & rs1("pic")&""";" & chr(10) &_
"oSP.LinkUrl = ""pic_big.asp?id="&rs1("gbookid")&"""; target=""_blank""" & chr(10) &_
"oSP.Title = """&biaot&"""" & chr(10) &_
"SlidePic_990.Add(oSP); " & chr(10) &_


"</script> "
%>

<span class="style1"><%=a%></span>
<%
rs1.movenext
bb=bb+1
loop
rs1.close
set rs1=nothing

%>
<script language=JavaScript>
SlidePic_990.Show();
//-->
</script>
...全文

相关推荐

vue.js图片转Base64上传图片并预览的实现方法

主要介绍了vue.js图片转Base64上传图片并预览的实现方法,小编觉得挺不错的,现在分享给大家,也给大家做个参考。一起跟随小编过来看看吧

weixin_38592405

vue实现的上传图片到数据库并显示到页面功能示例

主要介绍了vue实现的上传图片到数据库并显示到页面功能,结合实例形式分析了基于vue.js的数据库操作及页面图片显示相关操作技巧,需要的朋友可以参考下

weixin_38536841

JavaScript随机图片显示

NULL 博文链接:https://shanshandaocao-163-com.iteye.com/blog/752765

weixin_38669628

原生JS实现隐藏显示图片 JS实现点击切换图片效果

今天要说的内容,看标题就都能知道了!所有知识点一览无遗啊!咱们今天的东西,是纯纯的原生JS代码, 我先说一下要求, 1.有两个按钮,内容为显示,和换, 2.当点击显示的时候,按钮文字变成隐藏,同时图片显示出来,同理,当点击隐藏的时候,按钮文字变成显示,图片隐藏起来 3.当点击换的时候,图片会变成另外一张,当再次点击的时候,图片又会变回来, 4.当图片隐藏的时候,图片不可变换 这就是要求,下面来看代码: &lt;!DOCTYPE html> &lt;html&gt; &lt;head&gt; &lt;meta charset="utf-8"&gt; &lt;title&gt;换图片&lt;/title&gt; &lt;/head&gt; &lt;body&gt; &lt;butt

weixin_38680625

图片显示特效javascript

图片显示特效javascript 图片显示特效javascript 图片显示特效javascript

try-catch-finally
评论 2
收藏 已收藏
分享
返回顶部
maituo
ASP 28,401 成员 356,940 内容