
























1.配置web.config (直接选择ASP.NET AJAX项目就不用特别配置了)
2.新建web服务:testws.asmx
3.在testws.cs文件中添加属性:(这点最重要)
[System.Web.Script.Services.ScriptService()]
<asp:ScriptManager ID="ScriptManager1" runat="server">
<Services>
<asp:ServiceReference Path="hotdataws.asmx" />
</Services>
</asp:ScriptManager>
<input id="button" type="button" value="调 用" onclick="return OnbuttonGo_click()" />
6.JAVASCRIPT中添加事件:
function Button1_onclick() {
HelloWorld(Oncomplete);
} 
Oncomplete(args){
alert(args);
}
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。