![]() |
#2
孤独冷雨2010-01-13 10:02
![]() 我一直用的这个你看看! <% set rs = Server.CreateObject("Adodb.Recordset") sql="Select * from news where len(firstImageName)>5 and (cataid=13 or cataid=14) order by addtime DESC" rs.Open sql,conn,1,1 %> <!--FLASH图片组 --> <SCRIPT type=text/javascript> <!-- var _width = 240 var _height = 200 var text_height = 20 var flash_height = _height + text_height var pic_arr = new Array(); var link_arr = new Array(); var text_arr = new Array(); var i = 0; <% t=0 do while not rs.EOF and t<5 response.Write "pic_arr["&t&"] ="&chr(34)&"./new/eWebEditor/UploadFile/"& rs("firstImageName") &""&chr(34)&" ; " response.Write chr(10) 'response.Write "link_arr["&t&"] ="&chr(34)&"./news/view.asp?id="& rs("n_id") &""&chr(34)&" ; " response.Write "link_arr["&t&"] ="&chr(34)&"./news_show.asp?id="& rs("id")&""&chr(34)&" ; " response.Write chr(10)&chr(13) LenTitle=rs("title") if len(LenTitle)>15 then LenTitle=left(LenTitle,15)&" …" 'response.Write "text_arr["&t&"] ="&chr(34)&""& LenTitle &""&chr(34)&" ; " response.Write "text_arr["&t&"] ="&chr(34)&""& LenTitle &""&chr(34)&" ; " response.Write chr(10) rs.movenext t=t+1 loop %> // var p = pic_arr.join("|"); var l = link_arr.join("|"); var t = text_arr.join("|"); var f = "images/focus.swf"; document.write('<object ID="focus_flash" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.,0,0,0" width="'+ _width +'" height="'+ flash_height +'">'); document.write('<param name="allowScriptAccess" value="sameDomain"><param name="movie" value="'+f+'"><param name="quality" value="high"><param name="bgcolor">'); document.write('<param name="menu" value="false"><param name=wmode value="transparent">'); document.write('<param name="FlashVars" value="pics='+p+'&links='+l+'&texts='+t+'&borderwidth='+_width+'&borderheight='+_height+'&textheight='+text_height+'">'); document.write('<embed ID="focus_flash" src="'+f+'" wmode="opaque" FlashVars="pics='+p+'&links='+l+'&texts='+t+'&borderwidth='+_width+'&borderheight='+_height+'&textheight='+text_height+'" menu="false" quality="high" width="'+ _width +'" height="'+ flash_height +'" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www. />'); document.write('</object>'); //--> </SCRIPT> |

<script type=text/javascript>
<!--
var focus_width=380//图片宽
var focus_height=220//图片高
var text_height=20//设置显示文字标题高度,最佳为20(如果不显示标题值设为0即可)
var swf_height = focus_height+text_height
//var pics=""
//var links=""
//var texts=""
<%
set db=conn.execute("select top 6 * from [News] where FirstImageName<>'' order by AddDate desc")
i=0
do while not db.eof
pics=pics&"|"&db("FirstImageName")
links=links&"|"&db("id")
texts=texts&"|"&db("Title")
db.moveNext
i=i+1
loop
response.write "var pics='"&right(pics,len(pics)-1)&"'"&vbcrlf
response.write "var links='"&right(links,len(links)-1)&"'"&vbcrlf
response.write "var texts='"&right(texts,len(texts)-1)&"'"&vbcrlf
%>
document.write('<object ID="focus_flash" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.,0,0,0" width="'+ focus_width +'" height="'+ swf_height +'">');
document.write('<param name="allowScriptAccess" value="sameDomain"><param name="movie" value="adplay.swf"><param name="quality" value="high"><param name="bgcolor" value="#FFFFFF">');
document.write('<param name="menu" value="false"><param name=wmode value="opaque">');
document.write('<param name="FlashVars" value="pics='+pics+'&links='+links+'&texts='+texts+'&borderwidth='+focus_width+'&borderheight='+focus_height+'&textheight='+text_height+'">');
document.write('<embed ID="focus_flash" src="adplay.swf" wmode="opaque" FlashVars="pics='+pics+'&links='+links+'&texts='+texts+'&borderwidth='+focus_width+'&borderheight='+focus_height+'&textheight='+text_height+'" menu="false" bgcolor="#C5C5C5" quality="high" width="'+ focus_width +'" height="'+ swf_height +'" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www. />');document.write('</object>');
//-->
</script>
大家帮我看下程序,问题是文字的超链接不能获取到。我是要http://www.***.com/show.asp?id=1连接相应的文章。以上的代码只能http://www.***.com/1其他就不显示。要怎么更改这段程序呢。 <!--
var focus_width=380//图片宽
var focus_height=220//图片高
var text_height=20//设置显示文字标题高度,最佳为20(如果不显示标题值设为0即可)
var swf_height = focus_height+text_height
//var pics=""
//var links=""
//var texts=""
<%
set db=conn.execute("select top 6 * from [News] where FirstImageName<>'' order by AddDate desc")
i=0
do while not db.eof
pics=pics&"|"&db("FirstImageName")
links=links&"|"&db("id")
texts=texts&"|"&db("Title")
db.moveNext
i=i+1
loop
response.write "var pics='"&right(pics,len(pics)-1)&"'"&vbcrlf
response.write "var links='"&right(links,len(links)-1)&"'"&vbcrlf
response.write "var texts='"&right(texts,len(texts)-1)&"'"&vbcrlf
%>
document.write('<object ID="focus_flash" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.,0,0,0" width="'+ focus_width +'" height="'+ swf_height +'">');
document.write('<param name="allowScriptAccess" value="sameDomain"><param name="movie" value="adplay.swf"><param name="quality" value="high"><param name="bgcolor" value="#FFFFFF">');
document.write('<param name="menu" value="false"><param name=wmode value="opaque">');
document.write('<param name="FlashVars" value="pics='+pics+'&links='+links+'&texts='+texts+'&borderwidth='+focus_width+'&borderheight='+focus_height+'&textheight='+text_height+'">');
document.write('<embed ID="focus_flash" src="adplay.swf" wmode="opaque" FlashVars="pics='+pics+'&links='+links+'&texts='+texts+'&borderwidth='+focus_width+'&borderheight='+focus_height+'&textheight='+text_height+'" menu="false" bgcolor="#C5C5C5" quality="high" width="'+ focus_width +'" height="'+ swf_height +'" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www. />');document.write('</object>');
//-->
</script>