T
terry_zhou82
Unregistered / Unconfirmed
GUEST, unregistred user!
网页代码如下:<table id="weather_simple_table"><tr><td><strong>今天</strong></td><td>阴转多云</td><td><span class="high">16℃</span>~ <span class="low">7℃</span></td></tr>。。。。我的CODE如下,但是在结尾处总会显示出</TD>大家帮我看看错在哪里啊?procedure TForm1.FormCreate(Sender: TObject);var rStream: TStringstream; astr,astr1,astr2:string; ii:integer;begin rStream:= TStringstream.Create(''); IdHTTP1.Get('http://tool.115.com/tianqi/江阴',rStream); astr := rStream.DataString; astr2 := copy(astr, pos('</strong></td>', astr)+14, 100); astr2 := copy(astr2,Pos('<td>',astr2)+4,(Pos('</td>',astr2)-1)); // ShowMessage(IntToStr(Pos('</td>',astr2)-1)); label1.caption:=Trim(Utf8ToAnsi(astr2));我只需提取“阴转多云”的字样