--前台
$.ajax({ 
type: "POST", 
contentType: "application/json", 
url: "WebForm2.aspx/GetUserName", 
data: "{}", 
dataType: "json", 
success: function(){.......} 
}); 

 

--list集合

$.ajax({
type: "POST",
contentType: "application/json",
url: "DeHx.aspx/GetUserName",
data: "", // data:"{uid:"+str+"}",
dataType: "json",
success: function(data){
$.each(data, function (key, val) {
var te = eval(data[key]);
alert(te);
});
}
});


--后台

[WebMethod(EnableSession = true)]
public static string GetUserName()  //(string  uid)
{
return "123";
}



 

相关文章:

  • 2021-10-20
  • 2021-07-19
  • 2022-12-23
  • 2022-12-23
  • 2022-02-26
  • 2022-12-23
  • 2022-12-23
  • 2021-06-26
猜你喜欢
  • 2021-07-24
  • 2022-12-23
  • 2021-06-08
  • 2022-12-23
  • 2021-06-17
  • 2022-12-23
  • 2019-08-12
相关资源
相似解决方案