加入收藏 | 设为首页 | RSS
您当前的位置:首页 > 建站教程 > 网页技巧

一个例子:从新浪提取上海天气的vbs

时间:2012-04-30 13:09:12  来源:  作者:虾谷


if instr(wstr,"<img src=images/sina_sh/new/sh24.gif width=172 height=17>")>0 then 
wstr=mid(wstr,instr(wstr,"<img src=images/sina_sh/new/sh24.gif width=172 height=17>")+len("<img src=images/sina_sh/new/sh24.gif width=172 height=17>")) 
wstr=mid(wstr,instr(wstr,"<table width=160 border=0 cellspacing=0 cellpadding=0>")) 
wstr=mid(wstr,1,instr(wstr,"</table>")+len("</table>")) 
end if 
wstr=replace(wstr,"<tr><td colspan=3 align=right><a href=http://weather.sina.com.cn/>其他城市</a><font color=#015B7B>>></font></td></tr>","") 
dim pos1,pos2 
pos1=instr(wstr,"<tr>") 
pos2=instr(pos1,wstr,"</tr>") 
wstr=right(wstr,len(wstr)-pos2-4-4) 
wstr=replace(wstr,"</table>","") 
wstr=replace(wstr,"width=35","") 
wstr=replace(wstr,"width=45","") 
wstr=replace(wstr,"width=60","") 
'Response.Write wstr 
if err.number=0 then 
Set f = fs.CreateTextFile(incFilePath & incWeather,true) 
来顶一下
返回首页
返回首页
推荐资讯
10步征服web2.0链轮第四步,决定链轮模式
10步征服web2.0链轮第
10步征服web2.0链轮第三步,消除“电子足迹”
10步征服web2.0链轮第
10步征服web2.0链轮第一步,理解链轮的概念
10步征服web2.0链轮第
小贺店铺
小贺店铺
相关文章
    无相关信息
栏目更新
栏目热门