在javascript中用微软的htc组件调用web service
2006-12-23 14:41 BAsil 阅读(607) 评论(0) 收藏 举报
<script>
function init()
{
service.useService("http://localhost/YSGL/YSEstablish/YuSuanHistory.asmx?WSDL","test");
var iCallID = service.test.callService("getResult");
}
function onWSresult()
{
alert(event.result.value);
}
</script>
<body>
<div id="service" style="behavior:url(webservice.htc)" onresult="onWSresult()"></div>
</body>webservice
[WebMethod]
public string getResult()
{
return "Hello World";
}



浙公网安备 33010602011771号