请问谁可以给一个带数据库功能的图片轮换代码,不要求是Flash的

于之 2009-08-06 02:15:11
请问谁可以给一个带数据库功能的图片轮换代码,不要求是Flash的, 请哪位朋友帮忙提供一下,谢谢!
...全文
120 8 打赏 收藏 转发到动态 举报
写回复
用AI写文章
8 条回复
切换为时间正序
请发表友善的回复…
发表回复
-无恙- 2009-08-10
  • 打赏
  • 举报
回复
[Quote=引用 7 楼 limx001 的回复:]
谢谢楼上的! 如果要求出现有数字1,2,3,4在下面,可以自动地跳动选择数字的,是不是都是flash型的?
[/Quote]
嗯,这种代码网上有许多的!
-无恙- 2009-08-07
  • 打赏
  • 举报
回复
把图片路径改成动态的就行了
<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='center'><a id='Url_" + this.ID + "' 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_664 = new SlidePic_Article("SlidePic_664");
SlidePic_664.Width = 330;
SlidePic_664.Height = 224;
SlidePic_664.TimeOut = 4000;
SlidePic_664.Effect = 23;
SlidePic_664.TitleLen = 32;
var oSP = new objSP_Article();
oSP.ImgUrl = "img/1.jpg";
oSP.LinkUrl = "#";
SlidePic_664.Add(oSP);
var oSP = new objSP_Article();
oSP.ImgUrl = "img/2.jpg";
oSP.LinkUrl = "#";
SlidePic_664.Add(oSP);
var oSP = new objSP_Article();
oSP.ImgUrl = "img/3.jpg";
oSP.LinkUrl = "#";
SlidePic_664.Add(oSP);

SlidePic_664.Show();
//-->
</script>
于之 2009-08-07
  • 打赏
  • 举报
回复
谢谢楼上的! 如果要求出现有数字1,2,3,4在下面,可以自动地跳动选择数字的,是不是都是flash型的?
sy_binbin 2009-08-06
  • 打赏
  • 举报
回复
http://www.lanrentuku.com/js/p1.html
这里有很多!
KK3K2005 2009-08-06
  • 打赏
  • 举报
回复
94 前台显示又不管数据是 硬编码还是数据源取出的
poiuy343 2009-08-06
  • 打赏
  • 举报
回复
无非是下一个不带数据库的代码
然后把图片的地址用数据库的某个字段代替罢了。
sumjor 2009-08-06
  • 打赏
  • 举报
回复
jiangshanwws 2009-08-06
  • 打赏
  • 举报
回复
没有答案分给我吧

28,390

社区成员

发帖
与我相关
我的任务
社区描述
ASP即Active Server Pages,是Microsoft公司开发的服务器端脚本环境。
社区管理员
  • ASP
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

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