我有ASP焦点新闻代码,怎么读取数据库内容?

<divid="dplayer2"style="PADDING-RIGHT:0px;PADDING-LEFT:0px;BACKGROUND:#ffffff;PADDING... <div id="dplayer2" style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; BACKGROUND: #ffffff; PADDING-BOTTOM: 0px; MARGIN: 0px 0px 0px 0px; WIDTH: 225px; PADDING-TOP: 0px; HEIGHT: 220px"></div>
<SCRIPT language=javascript type=text/javascript>
var titles = '<%=rs("a.d_title")%>|<%=rs("b.d_title")%>|走出神话的奥巴马|世界各地支持者庆祝';
var imgs='http://img1.qq.com/news/pics/13764/13764029.jpg|http://img1.qq.com/news/pics/13763/13763827.jpg|http://img1.qq.com/news/pics/13766/13766703.jpg|http://img1.qq.com/news/pics/13766/13766940.jpg';
var urls='http://www.lanrentuku.com/|http://www.lanrentuku.com/|http://www.lanrentuku.com/|http://www.lanrentuku.com/';
var pw = 250;
var ph = 220;
var sizes = 14;
var Times = 4000;
var umcolor = 0xFFFFFF;
var btnbg =0xFF7E00;
var txtcolor =0xFFFFFF;
var txtoutcolor = 0x000000;
var flash = new SWFObject('focus1.swf', 'mymovie', pw, ph, '7', '');
flash.addParam('allowFullScreen', 'true');
flash.addParam('allowScriptAccess', 'always');
flash.addParam('quality', 'high');
flash.addParam('wmode', 'Transparent');
flash.addVariable('pw', pw);
flash.addVariable('ph', ph);
flash.addVariable('sizes', sizes);
flash.addVariable('umcolor', umcolor);
flash.addVariable('btnbg', btnbg);
flash.addVariable('txtcolor', txtcolor);
flash.addVariable('txtoutcolor', txtoutcolor);
flash.addVariable('urls', urls);
flash.addVariable('Times', Times);
flash.addVariable('titles', titles);
flash.addVariable('imgs', imgs);
flash.write('dplayer2');
</SCRIPT>
如果按照他给的代码里面的设置,
那不是每次都要修改首页才能更换图片,
那多麻烦啊,请问还有什么其他的办法没有,有请写出详细代码。谢谢!
没有人看见这个问题吗?
展开
 我来答
deffed008
2009-04-07 · TA获得超过841个赞
知道小有建树答主
回答量:496
采纳率:0%
帮助的人:323万
展开全部
带缩略图的轮换广告代码,将下面代码加入网页中即可(图片和文字说明你可以从数据库中调出!)
下面代码系转载,来自:http://www.qpsh.com/javascript/showpage2526.htm

<style>
BODY {
PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 12px; BACKGROUND: #000; PADDING-BOTTOM: 0px; MARGIN-LEFT: auto; COLOR: #f6f6ee; MARGIN-RIGHT: auto; PADDING-TOP: 0px; FONT-FAMILY: 宋体; HEIGHT: 490px; TEXT-ALIGN: center
}
A {
COLOR: #fff; TEXT-DECORATION: none
}
A:hover {
COLOR: #fff; TEXT-DECORATION: underline
}
.fpic {
BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; Z-INDEX: 3; BACKGROUND: #000; BORDER-BOTTOM-WIDTH: 0px; WIDTH: 476px; POSITION: relative; HEIGHT: 330px; BORDER-RIGHT-WIDTH: 0px;BORDER: #dddddd 1px solid;
text-align:center
}
.bpic {
FLOAT: left; MARGIN: 0px; WIDTH: 244px; POSITION: relative; HEIGHT: 243px
}
#focpic {
BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; LEFT: 1px; BORDER-BOTTOM-WIDTH: 0px; POSITION: absolute; TOP: 1px; BORDER-RIGHT-WIDTH: 0px
}
.thubpic {
PADDING-RIGHT: 0px; PADDING-LEFT: 4px; Z-INDEX: 20; PADDING-BOTTOM: 0px; WIDTH: 63px; CURSOR: pointer; PADDING-TOP: 4px; TOP: 10px; HEIGHT: 49px
}
.thubpiccur {
PADDING-RIGHT: 0px; PADDING-LEFT: 4px; Z-INDEX: 20; PADDING-BOTTOM: 0px; WIDTH: 63px; CURSOR: pointer; PADDING-TOP: 4px; TOP: 10px; HEIGHT: 49px
}
.thubpiccur {
Z-INDEX: 30; BACKGROUND: url(icon/images20071220/arrow3.gif) no-repeat left 50%
}
.thubpic IMG {
BORDER-RIGHT: #666 3px solid; BORDER-TOP: #666 2px solid; BORDER-LEFT: #666 3px solid; WIDTH: 56px; BORDER-BOTTOM: #666 2px solid; HEIGHT: 42px
}
.thubpiccur IMG {
BORDER-RIGHT: #666 3px solid; BORDER-TOP: #666 2px solid; BORDER-LEFT: #666 3px solid; WIDTH: 56px; BORDER-BOTTOM: #666 2px solid; HEIGHT: 42px
}
.thubpiccur IMG {
BORDER-LEFT-COLOR: #fff; BORDER-BOTTOM-COLOR: #fff; BORDER-TOP-COLOR: #fff; BORDER-RIGHT-COLOR: #fff
}
-->
</style>
<SCRIPT language=javascript>
//all by www.qpsh.com
var currslid = 0;
var slidint;
function setfoc(id){
document.getElementById("focpic").src = picarry[id];
document.getElementById("foclnk").href = lnkarry[id];
document.getElementById("fttltxt").innerHTML = '<a href="'+lnkarry[id]+'" target="_blank">'+ttlarry[id]+'</a>';
currslid = id;
for(i=0;i<6;i++){
document.getElementById("tmb"+i).className = "thubpic";
};
document.getElementById("tmb"+id).className ="thubpiccur";
focpic.style.visibility = "hidden";
focpic.filters[0].Apply();
if (focpic.style.visibility == "visible") {
focpic.style.visibility = "hidden";
focpic.filters.revealTrans.transition=23;
}
else {
focpic.style.visibility = "visible";
focpic.filters[0].transition=23;
}
focpic.filters[0].Play();
stopit();
}

function playnext(){
if(currslid==5){
currslid = 0;
}
else{
currslid++;
};
setfoc(currslid);
playit();
}
function playit(){
slidint = setTimeout(playnext,4500);
}
function stopit(){
clearTimeout(slidint);
}
window.onload = function(){
playit();
}
</SCRIPT>
</head>

<body>
<DIV class=fpic>
<A id=foclnk href="http://www.qpsh.com/" target=_blank><IMG id=focpic style="FILTER: RevealTrans ( duration = 1,transition=23 ); VISIBILITY: visible; POSITION: absolute" height=300 alt="" src="icon/images20071220/01.jpg" width=400></A>
<DIV id=fttltxt
style="MARGIN-TOP: 305px; FLOAT: left; WIDTH: 400px; TEXT-ALIGN: center"><A
href="http://www.qpsh.com/" target=_blank>梦:牧场小屋</A></DIV>
<DIV style="MARGIN-LEFT: 402px; WIDTH: 65px">
<DIV class=thubpiccur id=tmb0 onmouseover=setfoc(0); onmouseout=playit();><A
href="http://www.qpsh.com/" target=_blank><IMG
src="icon/images20071220/01.jpg" alt="" width=56 height=42 border="0"></A></DIV>
<DIV class=thubpic id=tmb1 onmouseover=setfoc(1); onmouseout=playit();><A
href="http://www.qpsh.com/" target=_blank><IMG height=45 alt=""
src="icon/images20071220/02.jpg" width=56></A></DIV>
<DIV class=thubpic id=tmb2 onmouseover=setfoc(2); onmouseout=playit();><A
href="http://www.qpsh.com/" target=_blank><IMG height=45 alt=""
src="icon/images20071220/03.jpg" width=56></A></DIV>
<DIV class=thubpic id=tmb3 onmouseover=setfoc(3); onmouseout=playit();><A
href="http://www.qpsh.com/" target=_blank><IMG height=45 alt=""
src="icon/images20071220/04.jpg" width=56></A></DIV>
<DIV class=thubpic id=tmb4 onmouseover=setfoc(4); onmouseout=playit();><A
href="http://www.qpsh.com/" target=_blank><IMG height=45 alt=""
src="icon/images20071220/05.jpg" width=56></A></DIV>
<DIV class=thubpic id=tmb5 onmouseover=setfoc(5); onmouseout=playit();><A
href="http://www.qpsh.com/" target=_blank><IMG height=45 alt=""
src="icon/images20071220/06.jpg" width=56></A></DIV>
<SCRIPT language=javascript type=text/javascript>
var picarry = {};
var lnkarry = {};
var ttlarry = {};
picarry[0] = "icon/images20071220/01.jpg";
lnkarry[0] = "http://www.qpsh.com/";
ttlarry[0] = "梦:牧场小屋";
picarry[1] = "icon/images20071220/02.jpg";
lnkarry[1] = "http://www.qpsh.com/";
ttlarry[1] = "碎玉:回眸";
picarry[2] = "icon/images20071220/03.jpg";
lnkarry[2] = "http://www.qpsh.com/";
ttlarry[2] = "飞狐:豆花档";
picarry[3] = "icon/images20071220/04.jpg";
lnkarry[3] = "http://www.qpsh.com/";
ttlarry[3] = "牛说不哭:烈日下的建筑工人";
picarry[4] = "icon/images20071220/05.jpg";
lnkarry[4] = "http://www.qpsh.com/";
ttlarry[4] = "新疆瓦格:哈萨克族搭建毡房";
picarry[5] = "icon/images20071220/06.jpg";
lnkarry[5] = "http://www.qpsh.com/";
ttlarry[5] = "松间明月:汽车文化";
</SCRIPT>
</DIV></DIV>

参考资料: http://www.qpsh.com/showjs.asp

本回答被提问者采纳
已赞过 已踩过<
你对这个回答的评价是?
评论 收起
推荐律师服务: 若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询

为你推荐:

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

类别

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

说明

0/200

提交
取消

辅 助

模 式