<input type=text onclick="refreshMe()" id="txtDemo"><script language=javascript> function refreshMe() { var xmlDoc = new ActiveXObject("Microsoft.XMLDOM") ; xmlDoc.async = false ; xmlDoc.load("yourWebService.asmx/WebMethod?parameter=value") ; //以下只把WebService返回的XML显示在text中,若要取某个节点或元素的值或属性,请用XMLDOM解析获取 txtDemo.value = xmlDoc.xml ; } </script>以上未经测试,详细资料请参考XMLDOM编程资料。
look into the WebService Behavior: http://msdn.microsoft.com/library/default.asp?url=/workshop/author/webservice/overview.aspbasically, you retrieve data through the WebService Behavior, then update the screen using DHTML + Javascript
function refreshMe() {
var xmlDoc = new ActiveXObject("Microsoft.XMLDOM") ;
xmlDoc.async = false ;
xmlDoc.load("yourWebService.asmx/WebMethod?parameter=value") ;
//以下只把WebService返回的XML显示在text中,若要取某个节点或元素的值或属性,请用XMLDOM解析获取
txtDemo.value = xmlDoc.xml ;
}
</script>以上未经测试,详细资料请参考XMLDOM编程资料。
the WebService Behavior:
http://msdn.microsoft.com/library/default.asp?url=/workshop/author/webservice/overview.aspbasically, you retrieve data through the WebService Behavior, then update the screen using DHTML + Javascript