知识库

常用的flash图文幻灯片asp代码

来源: 本站    类别: 知识库    日期: 2016/8/1

 

下面是我的程序代码:(很多多于的代码我都删除了,conn.asp数据库链接程序我没写出来,大家自己搞定)。

以下为引用的内容:

<!--#include file="conn.asp" -->
 <script type="text/javascript">//这是javacript语言

<% //这有是asp网络语言


       sql="select * from pic order by id desc"
       set rs=Server.CreateObject("ADODB.RecordSet")
       rs.open sql,conn,1,1
 
         title1=rs("title")
         url1=rs("url")
         rs.movenext

         title2=rs("title")
         url2=rs("url")
         rs.movenext

         rs.close
         set rs=nothing 
 
 %>
 

var imgUrl=new Array();
var imgtext=new Array();

imgtext[1]="<%=title1%>";
imgUrl[1]="<%=url1%>";
imgtext[2]="<%=title2%>";
imgUrl[2]="<%=url2%>";
 

 var focus_width=240
 var focus_height=200
 var text_height=18
 var swf_height = focus_height+text_height
 
 
 var pics=imgUrl[1]+"|"+imgUrl[2] 
 var texts=imgtext[1]+"|"+imgtext[2] 
 
 
 document.write('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" width="'+ focus_width +'" height="'+ swf_height +'">');
 document.write('<param name="allowScriptAccess" value="sameDomain"><param name="movie" value="focus1.swf"><param name="quality" value="high"><param name="bgcolor" value="#F0F0F0">');
 document.write('<param name="menu" value="false"><param name=wmode value="opaque">');
 document.write('<param name="FlashVars" value="pics='+pics+'&texts='+texts+'&borderwidth='+focus_width+'&borderheight='+focus_height+'&textheight='+text_height+'">');
 document.write('</object>');
 
 </script>

<%  
 conn.close
   set conn=nothing
 %>


相关文章


Copyright © 2004 - 2024 CNHWW Inc. All Rights Reserved
石家庄市征红网络科技有限公司版权所有 邮政编码:050051
服务电话:0311-85315152 13931185013 在线客服QQ:81447932 / 81447933 邮箱: cnhww@163.com