Traditional Culture Encyclopedia - Weather inquiry - How to use the weather forecast interface in VB.NET?
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.
- Related articles
- Interpretation of Two Poems of Gao Shi's Biedongda (Ⅰ)
- What clothes are suitable for going out at 20 degrees?
- Turn on the air conditioner for the children in summer, and just adjust it to 26 degrees? There are also these things that parents should understand.
- How should chemical fertilizers be preserved in hot and humid days if they want to be stored without failure?
- Tujia knowledge
- Scream txt complete works
- Come and help me solve this geography problem.
- Dream of Xuzhou
- Weather forecast of Central Meteorological Observatory Tianjin 65438+August weather forecast 16.
- 165438+ October weather in Jeju