标题: ASP教程之js和asp 显示数据库中图片 [打印本页] 作者: 分手快乐 时间: 2015-2-3 23:37 标题: ASP教程之js和asp 显示数据库中图片 asp,你就只能等着微软给你解决,它不乐意你就只好悲催。而且asp跑在windows服务器上,windows服务器跟linux比起来简直弱爆了!js|数据|数据库|显示 <table width="100%" border="0" align="center" cellspacing="0" cellpadding="0" style="TABLE-LAYOUT: fixed">
<%
sql="select top 4 * from Ad where checked=true "
rs.Open sql,conn,1,1
if not rs.eof then
n=0
while not rs.EOF
n=n+1
%>
<%=rs("AdSitePic")%>
<%
rs.MoveNext
wend
%>
<td width="100%" height="220">
<script language="JavaScript1.2">
var slideshow_width='200px' //SET SLIDESHOW WIDTH (set to largest image's width if multiple dimensions exist)
var slideshow_height='200px' //SET SLIDESHOW HEIGHT (set to largest image's height if multiple dimensions exist)
var pause=3000 //SET PAUSE BETWEEN SLIDE (2000=2 seconds)
var slidebgcolor="white"
function rotateimage(){
if (ie4||dom){
resetit(curcanvas)
var crossobj=tempobj=ie4? eval("document.all."+curcanvas) : document.getElementById(curcanvas)
crossobj.style.zIndex++
var temp='setInterval("movepic()",50)'
dropslide=eval(temp)
curcanvas=(curcanvas=="canvas0")? "canvas1" : "canvas0"
}
else
document.images.defaultslide.src=dropimages[curimageindex]
linkindex=curimageindex
curimageindex=(curimageindex<dropimages.length-1)? curimageindex+1 : 0
}
function rotatelink(){
if (droplinks[linkindex]!="")
window.location=droplinks[linkindex]
}
function resetit(what){
curpos=parseInt(slideshow_width)*(-1)
var crossobj=ie4? eval("document.all."+what) : document.getElementById(what)
crossobj.style.left=curpos+"px"
}
function startit(){
var crossobj=ie4? eval("document.all."+curcanvas) : document.getElementById(curcanvas)
crossobj.innerHTML='<a href="'+droplinks[curimageindex]+'"><img src="'+dropimages[curimageindex]+'" border=0></a>'
rotateimage()
}