| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 641 人关注过本帖
标题:[求助]document.write如何表现flash
只看楼主 加入收藏
huifeidezhu
Rank: 1
等 级:新手上路
帖 子:88
专家分:0
注 册:2005-11-29
收藏
 问题点数:0 回复次数:3 
[求助]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>&nbsp;&nbsp;');"%>
<%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&"&nbsp;&nbsp;');"
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>&nbsp;&nbsp;<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编辑过]

搜索更多相关主题的帖子: document write flash 
2007-01-15 16:41
huifeidezhu
Rank: 1
等 级:新手上路
帖 子:88
专家分:0
注 册:2005-11-29
收藏
得分:0 
有没有人帮我一下啊?各位高手帮我一把吧 !!感谢再感谢!

希望能和大家学到很多东西!!
2007-01-16 08:27
huifeidezhu
Rank: 1
等 级:新手上路
帖 子:88
专家分:0
注 册:2005-11-29
收藏
得分:0 
唉~~

希望能和大家学到很多东西!!
2007-01-22 15:54
四季如春
Rank: 1
等 级:新手上路
帖 子:27
专家分:0
注 册:2006-4-28
收藏
得分:0 
document.write("
<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>")
2007-01-22 15:59
快速回复:[求助]document.write如何表现flash
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.046002 second(s), 7 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved