How to use the weather forecast interface in VB.NET?
Const? Website? =? "/data/ 10 10 10 100 . html "? The text read from the website is structured type data of scripting language.
Dim? xmlHTTP? As? target
Settings? xmlHTTP? =? CreateObject ("Microsoft. XMLHTTP”)
xmlHTTP。 Open? "Got it"? Website,? wrong
xmlHTTP.send
What if? xmlHTTP.readystate? =? 4? then
Dim? jsCode? As? line
jsCode? =? xmlHTTP.responseText
jsCode? =? “var? f= "? & amp? jsCode? Add "var? F= "constitutes a complete assignment statement, so that the member data can be read through the f variable.
Dim? jsObject? As? target
Settings? jsObject? =? CreateObject("MSScriptControl。 ScriptControl”)? But the above is a JavaScript statement, which needs to be parsed by this object.
jsObject。 Language? =? " javascript "
jsObject。 AddCode? jsCode
-
MsgBox? jsObject。 Eval("f.weatherinfo.index48_d ")? This is the member value of the read structure variable.
End? if
End? Sub, I just saw that I want to write VB.NET code, which is vb6.0. Maybe VB.NET can do it.