运用ajax和jquey直接调用Aspx.cs后台的方法
注意:后台的方法必须是静态的,方法之前必须加上[WebMethod]
一:前台接收后台传过来的json
前台js
$.ajax({
type: "post",
url: "List.aspx/GetList",
dataType: "json",
contentType: "application/json",
success: function (data) {
for (var i = 0; i < data.d.length; i++) {
var tr =