一段调用webserviece的代码老是出错,请各位大侠帮忙!
lxhvc 2004-06-19 05:44:53 case else
index=0
'建立XMLDOM对象用Load方法呼叫Web Service,将结果装入XML DOM对象
div1.innerHtml =""
Set docSubmit = CreateObject("MSXML2.DOMDocument")
docSubmit.async = False
docSubmit.load "http://msft-chen/ASPTips2/CH1/SearchTitles.asmx/doSearch?keyword=" & Trim(Text1.value)
'因为使用Httpget方式,URL会被encode所以要再传回来,这部分比较麻烦
docSubmit.loadXML replace(replace(docSubmit.xml,"<","<"),">",">")
'msgbox docSubmit.xml
'重组DHTML效果字符串
set nodeList=docSubmit.documentElement.getElementsByTagname("Table")
for each node in nodeList
s=s & "<div style=""WIDTH:490px;"" class=""gotTitle"" onmouseover=""javascript:this.style.backgroundColor='lightblue'"" onmouseout=""javascript:this.style.backgroundColor='white'"" onclick=""gotTitle_onclick""> " & node.selectSingleNode("title").text & "</div>"
next
div1.innerHtml=s
div1.style.visibility="visible"