複製代碼 代碼如下:<%@LANGUAGE="JAVASCRIPT"%> <title>Google PR值查詢 asp程式</title> <% function hexdec(str) { return parseInt(str,16); } function zeroFill(a,b) { var z = hexdec(80000000); if (z & a) { a = a>>1; a &= ~z; a |= 0x4
複製代碼 代碼如下:'排序 Function Sort1(ary) Dim KeepChecking,I,FirstValue,SecondValue KeepChecking = TRUE Do Until KeepChecking = FALSE KeepChecking = FALSE For I = 0 to UBound(ary) If I = UBound(ary) Then Exit For If ary(I) > ary(I+1) Then FirstValue =
js代碼如下: 複製代碼 代碼如下:<script type="text/javascript"> //禁用右鍵菜單 document.oncontextmenu=ContextMenu; //滑鼠右擊事件 function ContextMenu() { //建立兩個變數,作為菜單出現的座標 var x; var y; //擷取菜單外部Div(下面簡稱面板) var FramePanel=document.getElementById("FrameDiv");
使用方法:手工修改html檔案的名稱與想要產生的asp的檔案名稱,然後將下面的代碼儲存為1.vbs,跟1.html放同一個目錄雙擊運行即可。複製代碼 代碼如下:html = "1.html" asp = "1.asp" Set fso = CreateObject("Scripting.FileSystemObject") Set fhtml = fso.OpenTextFile(html, 1) Set fasp = fso.OpenTextFile(asp, 2, true) While
複製代碼 代碼如下:'===================================== '獲得檔案尾碼 '===================================== Function Get_Filetxt(ByVal t0) Dim t1 IF Len(t0)<2 Or Instr(t0,".")=0 Then Get_Filetxt=False:Exit Function t1=Split(t0,".")
複製代碼 代碼如下:'============================== '格式化HTML,SDCMS加強版 '============================== Function Nohtml(ByVal t0) IF Len(t0)=0 Or IsNull(t0) Then Nohtml="" Exit Function End IF Dim Regs,Matches,Match Set Regs=New Regexp Regs.Ignorecase=True Regs.
複製代碼 代碼如下:public function fillzero(l1) if len(l1)=1 then fillzero="0"&l1 else fillzero=l1 end if end function 用法樣本: 複製代碼 代碼如下:response year(now)&month(now)&day(now) 結果:201116 response
複製代碼 代碼如下:Function getCurrentUrl() On Error Resume Next Dim strTemp If LCase(Request.ServerVariables("HTTPS")) = "off" Then strTemp = "http://" Else strTemp = "https://" End If strTemp = strTemp & Request.ServerVariables("SERVER_NAME") If