JQuery直接调用asp.net后台WebMethod方法

JQuery直接调用asp.net后台WebMethod方法。这里面有很全的调用方法。

当然应用方式也可以向我这样

直接在类中定义webservice方法(类不是webservice)

   [System.Web.Services.WebMethod]
    public static string GetMainInfo(string SchoolID)
    {
   }

这是有参的,在js中ajax调用这个方法时需要加入data,把SchoolID这个参数的值传入

猜你喜欢

转载自blog.csdn.net/weixin_41278749/article/details/83177596