%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
蚌埠天气
<%
response.write " 蚌埠易发网为您带来蚌埠天气信息
今天日期是: "
response.write date
response.write " 现在时间为: "
response.write time
response.write "
"
Dim objXMLHTTP, xml
Set xml = Server.CreateObject("Microsoft.XMLHTTP")
gCache_Url="http://weather.yahoo.com/forecast/CHXX0444_c.html?force_units=1"
xml.Open "GET", gCache_Url, False
xml.Send
Dim Vri_Xml_txt
Vri_Xml_txt=xml.responseText
top_Wea=""
top_cut=inStr(Vri_Xml_txt,top_Wea) '求在全长中第一次出现的位置
leng_Wea=len(Vri_Xml_txt) '求全长
Cut_off=(leng_Wea-top_cut)-55 '由全长-位置,算出剩下多少
tab_yahoo=right(Vri_Xml_txt,Cut_off) '截去页上部
bottom_1_Wea=""
bottom_cut=inStr(tab_yahoo,bottom_1_Wea)-1
tab_1_yahoo=left(tab_yahoo,bottom_cut) '载出了第一个表
tab_2_top=""
tab_2_Top_cut=inStr(Vri_Xml_txt,tab_2_top)
tab_2_Cut_off=(leng_Wea-tab_2_Top_cut)-61
tab_2_yahoo=right(Vri_Xml_txt,tab_2_Cut_off) '载去第二个表的上部
tab_2_bottom=""
tab_2_bottom_cut=inStr(tab_2_yahoo,tab_2_bottom)-1
tab_2_yahoo=left(tab_2_yahoo,tab_2_bottom_cut) '载出了第二个表
response.write "| "
response.write tab_1_yahoo
response.write " | "
response.write ""
response.write "
"
response.write " |
"
response.write "| "
response.write tab_2_yahoo
response.write " |
"
%>