引用 Anthem.dll 触发事件: οnclick="CallAjaxFunction(); 客户端JS主体: function CallAjaxFunction() { var findName = document.getElementById("txtName"); //获取客户输入数据参数 //Anthem库异步调用服务器端SayHello方法 Anthem_InvokePageMethod('SayHello',[findName.value] , AjaxFunctionCallback); } 回调函数处理 function AjaxFunctionCallback(response) { alert(response.value); } 服务器端主体: protected void Page_Load(object sender, EventArgs e) { // 向页面注册Anthem库 Anthem.Manager.Register(this); } // 声明为Anthem前端可感知的方法 [Anthem.Method] public string SayHello(string name) { return "Hello " + name + "!"; }