1个回答
展开全部
<%
set rs = server.CreateObject ("adodb.recordset")
sqlha = "select top 5 * from pic_table order by id desc"
rs.open sqlha,conn,1,1
dim Url(4),idx(4),bti(4),shu
shu=0
Do While Not rs.EOF
pic(shu)=rs("url")
shu=shu+1
rsha.movenext
Loop
rsha.close
set rsha=nothing
pic_lj=pic(0)&"|"&pic(1)&"|"&pic(2)&"|"&pic(3)&"|"&pic(4)
%>
<SCRIPT type=text/javascript>
var focus_width=319
var focus_height=234
var text_height=0
var swf_height = focus_height+text_height
var pics="<%= pic_lj %>"
document.write('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="" width="'+focus_width+'"height="'+swf_height+'">');
document.write('<param name="allowScriptAccess" value="sameDomain"><param name="movie" value="focus.swf">');
document.write('<param name="quality" value="high"><param name="bgcolor" value="#F0F0F0"><param name="menu" value="false">');
document.write('<param name="FlashVars" value="pics='+pics+'&borderwidth='+focus_width+'&borderheight='+focus_height+'">');
document.write('</object>');
</SCRIPT>
1、把以上代三保存为一个asp文件
2、建一数据库,有一个pic_table表,表中有一个url字段记录图片名称,至少有5条记录
3、去百度搜focus.swf,下载后放在与本文件同级目录下
4、运行此文件....OK 不明白?hi我
set rs = server.CreateObject ("adodb.recordset")
sqlha = "select top 5 * from pic_table order by id desc"
rs.open sqlha,conn,1,1
dim Url(4),idx(4),bti(4),shu
shu=0
Do While Not rs.EOF
pic(shu)=rs("url")
shu=shu+1
rsha.movenext
Loop
rsha.close
set rsha=nothing
pic_lj=pic(0)&"|"&pic(1)&"|"&pic(2)&"|"&pic(3)&"|"&pic(4)
%>
<SCRIPT type=text/javascript>
var focus_width=319
var focus_height=234
var text_height=0
var swf_height = focus_height+text_height
var pics="<%= pic_lj %>"
document.write('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="" width="'+focus_width+'"height="'+swf_height+'">');
document.write('<param name="allowScriptAccess" value="sameDomain"><param name="movie" value="focus.swf">');
document.write('<param name="quality" value="high"><param name="bgcolor" value="#F0F0F0"><param name="menu" value="false">');
document.write('<param name="FlashVars" value="pics='+pics+'&borderwidth='+focus_width+'&borderheight='+focus_height+'">');
document.write('</object>');
</SCRIPT>
1、把以上代三保存为一个asp文件
2、建一数据库,有一个pic_table表,表中有一个url字段记录图片名称,至少有5条记录
3、去百度搜focus.swf,下载后放在与本文件同级目录下
4、运行此文件....OK 不明白?hi我
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询