【发布时间】:2025-12-17 07:30:01
【问题描述】:
如果您只是在静态 HTML 中包含 JavaScript,那么使用 MicrosoftAjax.js 调用 ASMX Web 服务的正确方法是什么?
到目前为止我所拥有的:
<html>
<head>
<title>Testing</title>
<script type="text/javascript" src="scripts/MicrosoftAjax.js"></script>
<script type="text/javascript">
function testCallSoap() {
// in here I want to call the default HelloWorld() method
// it is located at ~/MyTestService.asmx
}
</script>
</head>
<body>
<div>
<span onclick="testCallSoap();">test</span><br />
</div>
</body>
</html>
【问题讨论】:
-
我认为您的意思是“ASMX Web 服务”
-
注意:另请阅读 InfinitiesLoop 的回答
标签: .net ajax web-services asp.net-ajax asmx