實(shí)例解析抓取天氣預(yù)報(bào)的程序(2)_ASP教程
推薦:ASP返回某字符串最后出現(xiàn)的位置% dwwwStr= divdwww.cn/divdivwww.dwww.cn/div設(shè)計(jì)家園 dwwwStr= InStrRev(dwwwStr,/div) response.write dwwwStr % InstrRev 描述 返回某字符串在另一個(gè)字符串中出現(xiàn)的從結(jié)尾計(jì)起的位置。 語法 InstrRev(string1, string2[, start[, compare]]) InstrRe
'// 采用 ADODB.Stream 處理采集到的數(shù)據(jù),把二進(jìn)制的文件轉(zhuǎn)成文本字符
Function Bytes2bStr(vin)
Dim BytesStream,StringReturn
Set BytesStream = Server.CreateObject("ADODB.Stream")
BytesStream.Type = 2
BytesStream.Open
BytesStream.WriteText vin
BytesStream.Position = 0
BytesStream.Charset = "GB2312"
BytesStream.Position = 2
StringReturn =BytesStream.ReadText
BytesStream.close
Set BytesStream = Nothing
Bytes2bStr = StringReturn
End Function
'//檢查組件,采用xmlhttp抓取網(wǎng)頁還是AspHTTP
Function IsObjInstalled(strClassString)
' On Error Resume Next
IsObjInstalled = False
Err = 0
Dim xTestObj
Set xTestObj = Server.CreateObject(strClassString)
If 0 = Err Then
If AspHttpOpen=1 Then
IsObjInstalled = True
Response.write "系統(tǒng)不支持 XMLHTTP 組件"
'Response.write "當(dāng)前組件 ASPHTTP"
response.end()
Else
IsObjInstalled = False
'Response.write "當(dāng)前組件 XMLHTTP"
End If
Else
IsObjInstalled = False
'Response.write "當(dāng)前組件 XMLHTTP"
End If
Set xTestObj = Nothing
Err = 0
End Function
%>
分享:解析Asp實(shí)現(xiàn)Dig程序中的投票ASP做一個(gè)dig程序中的投票(有的叫頂一下,踩一下),由于代碼較長,只貼出核心部分:投票中的代碼 網(wǎng)頁顯示投票的部分: div class=Vote1script src='/voteResult.asp?id=1action=view'/script/div 效果如圖: 520)this.width=500 border=0>,然后點(diǎn)投一
- asp FSO 讀寫文件本文件實(shí)現(xiàn)代碼
- asp中isNull、isEmpty和空字符串的區(qū)別
- asp獲取用戶真實(shí)IP地址的方法
- asp連接sqlserver數(shù)據(jù)庫實(shí)現(xiàn)代碼
- asp中正則表達(dá)式過濾html代碼函數(shù)
- asp中g(shù)et post提交表單區(qū)別
- 網(wǎng)頁模板:ASP內(nèi)建對(duì)象Request
- xmlhttp的open方法使用詳解
- ASP的常用的自定義函數(shù)大全
- asp中用for循環(huán)的一個(gè)小技巧
- eWebEditor v3.8 列目錄
- ASP無組件分頁實(shí)現(xiàn)思路及代碼
- 相關(guān)鏈接:
- 教程說明:
ASP教程-實(shí)例解析抓取天氣預(yù)報(bào)的程序(2)
。