[求助]document.write如何表现flash
定义一个函数读取图片,如果是flash时怎样写代码?求各位高手指教!不胜感激!<%
'-------------------JS调用函数---------------------
Function JsForm(ID)
Set rs = Server.CreateObject("adodb.recordset")
Sql="Select MayVote_Votes.MayVote_Topic,MayVote_Votes.MayVote_Check,MayVote_Votes.MayVote_Time,web.ID,web.wangzhanmingcheng,web.logo,web.VID From MayVote_Votes,web Where MayVote_Votes.ID = web.VID And MayVote_Votes.ID="&ID&" and web.shenhe=1 Order By web.MayVote_Order desc"
rs.Open Sql,Conn,1,1
If rs.Bof And rs.Eof Then
JsForm = "document.write('<div align=center><font color=red>Happend Error</font></div>')"
Else
JsForm = "document.write('<table width=100% border=2 cellspacing=0 cellpadding=2 bordercolor=#FF9900 align=center><form name=form method=post action=MayVote_Update.asp?ID="&ID&"><tr><td align=center colspan=5 height=40> <b class=font12>"&MayHTMLEncode(rs("MayVote_Topic"))&"</b><input name=MayVote_Time type=hidden id=MayVote_Time value="&rs("MayVote_Time")&"><input name=VID type=hidden id=VID value="&rs("VID")&"></td></tr>');"
dim i
i=0
Do While Not rs.Eof
If rs("MayVote_Check") = May_True Then
Input = "<input name=ID type=checkbox id=ID value="&rs("ID")&">"
Else
Input = "<input type=radio name=ID value="&rs("ID")&">"
End If
if i mod 5=0 then
JsForm = JsForm + "document.write('<tr>');"
end if
JsForm = JsForm + "document.write('<td align=center>"&MayHTMLEncode(rs("wangzhanmingcheng"))&"<br>');"
%>
<%'JsForm = JsForm + "document.write('<img src="&MayHTMLEncode(rs("logo"))&" width=120 height=60> ');"%>
<%if right(rs("logo"),3)<>"swf" then%>
<%JsForm = JsForm + "document.write('<img src="&MayHTMLEncode(rs("logo"))&" border=0 width=120 height=60>');"%>
<%else'下面是如果logo是flash时的表现方式%>
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="120" height="60">
<param name="movie" value="<%=rs("logo")%>">
<param name="quality" value="high">
<embed src="<%=rs("logo")%>" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="120" height="60"></embed>
</object>
<%end if%>
<%
JsForm = JsForm + "document.write('<br>"&Input&" ');"
i=i+1
JsForm = JsForm + "document.write('</td>');"
rs.movenext
Loop
JsForm = JsForm + "document.write('</tr>');"
JsForm = JsForm + "document.write('<tr><td align=center height=50 colspan=5 bgcolor=#ffdf2d><input name=Submit type=image style=border=0 name=imageField src=Images/MayVote/voteSubmit.gif> <a href=MayVote.asp?Action=Show&ID="&ID&" target=_blank><img src=Images/MayVote/voteView.gif width=52 height=18 border=0></a></td></tr></form></table>');"
End If
rs.Close
Set rs = Nothing
End Function
%>
[此贴子已经被作者于2007-1-15 16:47:03编辑过]