急急急!!谁能给我一个绑定了数据库的图片滚动代码,asp.net的,最好是直接给我页面,谢谢了,急啊,跪求

[复制链接]
查看11 | 回复1 | 2011-4-19 03:40:24 | 显示全部楼层 |阅读模式
因为我确实是比较急,谢谢了,我的邮箱是[email protected]
回复

使用道具 举报

千问 | 2011-4-19 03:40:24 | 显示全部楼层
<pre id=\"best-answer-content\" class=\"reply-text mb10\">Script Language=\"JavaScript\"

!--

function SlidePic(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=AddSlidePic; this.Show=ShowSlidePic; this.LoopShow=LoopShowSlidePic;}

function NewSlide() {this.ImgUrl=\"\"; this.LinkUrl=\"\"; this.Title=\"\";}

function AddSlidePic(SP) {this.AllPic[this.AllPic.length] = SP;}

function ShowSlidePic() {

if(this.AllPic[0] == null) return false;

document.write(\'div align=\"center\"a id=\"Url\' this.ID \'\" href=\"\" target=_blankimg 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(\"brDiv id=\'Title\" this.ID \"\'/Div/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 LoopShowSlidePic() {

if(this.PicNumthis.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 \'\" \' this.AllPic[this.PicNum].Title \'/a\';

this.Img.timer=setTimeout(this.ID \".LoopShow()\",this.TimeOut);

}

var SlidePic = new SlidePic(\"SlidePic\");

SlidePic.Width = 150; //这是图片宽度,修改成你需要的值

SlidePic.Height = 120; //这是图片高度 ,修改成你需要的值

SlidePic.TimeOut = 5000; //延迟时间 ,修改成你需要的值

SlidePic.Effect = 23;

SlidePic.TitleLen = 1;

%

\'幻灯片新闻代码

sql=\"select top 3 * from picnews order by id desc\" //数据库字段 ,修改成你需要的值。支持数据库调用

set rs=server.createobject(\"adodb.recordset\")

rs.open sql,conn,1,1

if not rs.eof then

k=1

Num_total=rs.recordcount

for i=1 to Num_total

%

var NewItem = new NewSlide();

NewItem.ImgUrl = \'%=rs(\"News_pic\")%\'; //图片地址

NewItem.LinkUrl= \'%=rs(\"News_url\")%\'; //链接地址

NewItem.Title = \'span%=rs(\"title\")%/span\'; //新闻标题

SlidePic.Add(NewItem);

%

rs.movenext

k=k 1

\'loop

next

else

response.write \"暂无图片新闻\"

end if

%

SlidePic.Show();

//--

/Script

















<h4 class=\"ask\">追问





<pre class=\"replyask-text\" id=\"content-4147235\">额
为什么你给的代码,我放到页面里就报错啊,36个呢,你能不能把这写好个页面发到我的邮箱啊,谢谢,我是真急啊




<a href=\"http://hiphotos.baidu.com/zhidao/pic/item/b999a901d166e4511d9583a2.jpg\" class=\"replyask-img-e\" title=\"点击查看大图\" target=\"_blank\">

<img src=\"http://hiphotos.baidu.com/zhidao/abpic/item/b999a901d166e4511d9583a2.jpg\"/>

</a>
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

主题

0

回帖

4882万

积分

论坛元老

Rank: 8Rank: 8

积分
48824836
热门排行