Recommended: Two interesting visitor counter designs As an indispensable part of the website, the visitor counter can not only record the number of times the website is visited, but also enhance the fun and viewability of the web page through vivid and interesting design, making the visitor counter a landscape on the web page. The following are two easy design fun
When I was making a program for the customer, I suddenly encountered a problem, which was how to correctly play the video format in the submitted URL when the user submitted the video playback file on the product page... I was depressed for a while and thought about it. Ideas, just do it if you say it...
The idea is to get the file type first and select different web player codes according to the type... Three to five to two... At the same time, for the reusability of the code in the future, a general call function was written to facilitate the future. Called in other systems...
The source code is now published as follows:
The following is the quoted content: 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,ram If Instr(Exts, isExt)=0 Then Response.write Illegal video file 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,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 method:
The following is the quoted content: Call SelPlay(DvUrl,280,220) |
Share: Recommended: Summary of commonly used source code for beginners of ASP 1. Obtain system time: <%=now()%> 2. Obtain the IP used for visiting: <%=request.serverVariables(remote_host)%> 3. Obtain system, browser version: <script>