1.

 1 ajax代码:
 2              $.ajax({
 3                     async: false,
 4                     cache: false,
 5                     type: 'POST',
 6                     contentType: "application/json",
 7                     url: "/MsgTypeTemItem/GetAllStr", //请求的action路径
 8                     data:{temId:$("#temId").val()},
 9                     error: function () {//请求失败处理函数  
10                         alert('请求失败');
11                     },
12                     success: function (data) { //请求成功后处理函数。    
13                         data = "[" + data + "]";
14                         treeNodes = eval(data);
15                     }
16                 });
17 Controller代码:
18 public string GetAllStr(string id)
19 {
20    List<MsgTypeTemItem> allList = msgTypeItemService.GetAll();
21     return "";
22 }

 

相关文章:

  • 2022-12-23
  • 2021-09-24
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-11-20
  • 2021-10-09
  • 2022-01-12
猜你喜欢
  • 2021-07-17
  • 2021-10-21
  • 2022-01-01
  • 2022-12-23
  • 2021-07-18
  • 2021-06-21
  • 2022-12-23
相关资源
相似解决方案