Web 服务,在 html 页面中访问服务我收到错误,这是我的代码。
<html xmlns="http://www.w3.org/1999/xhtml" >
<head>
<title>Untitled Page</title>
<script type ="text/javascript" language="JavaScript">
function InitializeService()
{
service.useService(http://www.freewebservicesx.com/GetGoldPrice.asmx?WSDL,
"GetCurrentGoldPrice");
}
Function getgold()
{
var users="xxxxx";
var pawd="xxx";
service.GetCurrentGoldPrice.callService("GetCurrentGoldPrice",users,pawd);
}
function ShowResult()
{
alert(event.result.value);
}
</script>
</head>
<body onload="InitializeService()" id="service" onresult="ShowResult()">
<button onclick="getgold()">Get Age</button>
</body>
</html>