日韩天天综合网_野战两个奶头被亲到高潮_亚洲日韩欧美精品综合_av女人天堂污污污_视频一区**字幕无弹窗_国产亚洲欧美小视频_国内性爱精品在线免费视频_国产一级电影在线播放_日韩欧美内地福利_亚洲一二三不卡片区

網(wǎng)頁視頻播放器程序代碼通用代碼_ASP教程

編輯Tag賺U幣
教程Tag:暫無Tag,歡迎添加,賺取U幣!

推薦:趣味訪客計數(shù)器設計兩則
訪客計數(shù)器作為網(wǎng)站不可缺少的部分,不僅可以記錄網(wǎng)站被訪問的次數(shù),而且可以通過生動有趣的設計來加強網(wǎng)頁的趣味性和可觀賞性,使訪客計數(shù)器成為網(wǎng)頁上 的一個風景。下面介紹兩種輕松設計趣

在給客戶做個程序時,突然遇到個問題,就是產品頁用戶提交視頻播放文件時,如何根據(jù)提交的網(wǎng)址內的視頻格式進行正確的播放呢....郁悶了一會,想好了思路,說動手就動手...

思路是先取得文件的類型,并根據(jù)類型選擇不同的網(wǎng)頁播放器代碼..三下五去二.....同時為了代碼在以后的復用性,寫成了通用的調用函數(shù).方便以后在別的系統(tǒng)中調用..

現(xiàn)發(fā)布源代碼如下:

以下為引用的內容:
Sub SelPlay(strUrl,strWidth,StrHeight)
Dim Exts,isExt
If strUrl <> "" Then
isExt = LCase(Mid(strUrl,InStrRev(strUrl, ".") 1))
Else
isExt = ""
End If
Exts = "avi,wmv,asf,mov,rm,ra,ram"
If Instr(Exts,isExt)=0 Then
Response.write "非法視頻文件"
Else
Select Case isExt
Case "avi","wmv","asf","mov"
Response.write "<EMBED id=MediaPlayer src="&strUrl&" width="&strWidth&" height="&strHeight&" loop=""false"" autostart=""true""></EMBED>"
Case "mov","rm","ra","ram"
Response.Write "<OBJECT height="&strHeight&" width="&strWidth&" classid=clsid:CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA>"
Response.Write "<PARAM NAME=""_ExtentX"" VALUE=""12700"">"
Response.Write "<PARAM NAME=""_ExtentY"" VALUE=""9525"">"
Response.Write "<PARAM NAME=""AUTOSTART"" VALUE=""-1"">"
Response.Write "<PARAM NAME=""SHUFFLE"" VALUE=""0"">"
Response.Write "<PARAM NAME=""PREFETCH"" VALUE=""0"">"
Response.Write "<PARAM NAME=""NOLABELS"" VALUE=""0"">"
Response.Write "<PARAM NAME=""SRC"" VALUE="""&strUrl&""">"
Response.Write "<PARAM NAME=""CONTROLS"" VALUE=""ImageWindow"">"
Response.Write "<PARAM NAME=""CONSOLE"" VALUE=""Clip"">"
Response.Write "<PARAM NAME=""LOOP"" VALUE=""0"">"
Response.Write "<PARAM NAME=""NUMLOOP"" VALUE=""0"">"
Response.Write "<PARAM NAME=""CENTER"" VALUE=""0"">"
Response.Write "<PARAM NAME=""MAINTAINASPECT"" VALUE=""0"">"
Response.Write "<PARAM NAME=""BACKGROUNDCOLOR"" VALUE=""#000000"">"
Response.Write "</OBJECT>"
Response.Write "<BR>"
Response.Write "<OBJECT height=32 width="&strWidth&" classid=clsid:CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA>"
Response.Write "<PARAM NAME=""_ExtentX"" VALUE=""12700"">"
Response.Write "<PARAM NAME=""_ExtentY"" VALUE=""847"">"
Response.Write "<PARAM NAME=""AUTOSTART"" VALUE=""0"">"
Response.Write "<PARAM NAME=""SHUFFLE"" VALUE=""0"">"
Response.Write "<PARAM NAME=""PREFETCH"" VALUE=""0"">"
Response.Write "<PARAM NAME=""NOLABELS"" VALUE=""0"">"
Response.Write "<PARAM NAME=""CONTROLS"" VALUE=""ControlPanel,StatusBar"">"
Response.Write "<PARAM NAME=""CONSOLE"" VALUE=""Clip"">"
Response.Write "<PARAM NAME=""LOOP"" VALUE=""0"">"
Response.Write "<PARAM NAME=""NUMLOOP"" VALUE=""0"">"
Response.Write "<PARAM NAME=""CENTER"" VALUE=""0"">"
Response.Write "<PARAM NAME=""MAINTAINASPECT"" VALUE=""0"">"
Response.Write "<PARAM NAME=""BACKGROUNDCOLOR"" VALUE=""#000000"">"
Response.Write "</OBJECT>"
End Select
End If
End Sub

調用方式:

以下為引用的內容:
Call SelPlay(DvUrl,280,220)

本文收集整理自互聯(lián)網(wǎng),若您是原文作者,請來信更改作者及出處Post#vip.qq.com(把#改為@)

分享:推薦:ASP初學者常用源代碼總結篇
1.獲得系統(tǒng)時間:   <%=now()%> 2.取得來訪用的IP:   <%=request.serverVariables("remote_host")%> 3.獲得系統(tǒng),瀏覽器版本:   <script>

來源:模板無憂//所屬分類:ASP教程/更新時間:2008-08-22
相關ASP教程