$.ajax({ type: "POST", //访问WebService使用Post方式请求 contentType: "application/json", //WebService 会返回Json类型 async: false, //url: "../WebService.asmx/BrandDate", //调用WebService的地址和方法名称组合 ---- WsURL/方法名 url: "../WebService.asmx/BrandDateStr", data: "{'ProductID':"+productid+",'BrandID':"+brandid+"}", //这里是要传递的参数,格式为 data: "{paraName:paraValue}",下面将会看到 dataType:"json", success: function(result) { //回调函数,result,返回值 datastr= result.d; } });
对ajax的详细理解
最新推荐文章于 2022-07-04 21:13:58 发布