?? fun.asp
字號(hào):
<%
'在此修改安裝目錄
YahooMusicUrl="http://www.artvip.com.cn"
'設(shè)定安裝路徑,結(jié)尾不包括斜杠“/”
'以下為核心函數(shù),請(qǐng)勿修改
Function RegExpTest(patrn,strng,rewho)
Dim re,Match,Matches
RetStr=strng
Set re = New RegExp '//建立正則表達(dá)式
re.Pattern = patrn '//建立正則表達(dá)式模式
re.IgnoreCase = True '//是否不區(qū)分大小寫,你可以關(guān)閉,因?yàn)镠TML標(biāo)記是不區(qū)分大小寫的。
re.Global = True '//是否全局可用
Set Matches = re.Execute(strng) '//執(zhí)行搜索
For Each Match in Matches '//遍歷匹配集合
RetStr=replace(RetStr,match.value,rewho) '//找到區(qū)配字符,并開始替換
Next
RegExpTest = RetStr
End Function
Function getHTTPPage(url)
On Error Resume Next
dim http
set http=Server.createobject("Microsoft.XMLHTTP")
Http.open "GET",url,false
Http.send()
if Http.readystate<>4 then
exit function
end if
getHTTPPage=bytesToBSTR(Http.responseBody,"gb2312")
set http=nothing
If Err.number<>0 then
Response.Write "<script language=""javascript"">alert('暫時(shí)無法訪問'); self.close();</script>"
Err.Clear
End If
End function
rooturl="http://www.artvip.com.cn/yahooring/"
sssooo="http://www.artvip.com.cn/"
Function BytesToBstr(body,Cset)
dim objstream,str1,str2
str1 = "adodb"
str2 = "stream"
set objstream = Server.CreateObject(""&str1&"."&str2&"")
objstream.Type = 1
objstream.Mode =3
objstream.Open
objstream.Write body
objstream.Position = 0
objstream.Type = 2
objstream.Charset = Cset
BytesToBstr = objstream.ReadText
objstream.Close
set objstream = nothing
End Function
'截取字符串,1.包括起始和終止字符,2.不包括
Function strCut(strContent,StartStr,EndStr,CutType)
Dim strHtml,S1,S2
strHtml = strContent
On Error Resume Next
Select Case CutType
Case 1
S1 = InStr(strHtml,StartStr)
S2 = InStr(S1,strHtml,EndStr)+Len(EndStr)
Case 2
S1 = InStr(strHtml,StartStr)+Len(StartStr)
S2 = InStr(S1,strHtml,EndStr)
End Select
If Err Then
strCute = ""
Err.Clear
Exit Function
Else
strCut = Mid(strHtml,S1,S2-S1)
End If
End Function
Function load(filename)
Set fs = Server.CreateObject("Scripting.FileSystemObject")
File = Server.MapPath(filename)
Set txt = fs.OpenTextFile(File)
If Not txt.atEndOfStream Then '先確定還沒有到達(dá)結(jié)尾的位置
load= txt.ReadAll '讀取整個(gè)文件的數(shù)據(jù)
End If
Set txt = Nothing
Set fs = Nothing
End Function
%>
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -