首页 > Web开发 > 详细

JS Post 传参

时间:2017-08-22 15:27:42      阅读:339      评论:0      收藏:0      [点我收藏+]

JS Post 传参

1 $.post("/Article/GetMoreChildComment", { articleid: articleId, prentcommentid:prentcommentid, page: childpage, pagesize: childpagesize }, function (result) {
2             childcomments = result.result;
3             debugger;
4             setTimeout(setchildcomment(thisa, index),2000);
5             childpage++;
6         });

 

Controller 接受并返回参数

 1         /// <summary>
 2         /// 获取评论子评论
 3         /// </summary>
 4         /// <param name="articleid"></param>
 5         /// <param name="prentcommentid"></param>
 6         /// <param name="page"></param>
 7         /// <param name="pagesize"></param>
 8         /// <returns></returns>
 9         [HttpPost]
10         public JsonResult GetMoreChildComment(long articleid,long prentcommentid, int page, int pagesize)
11         {
12 
13             List<ChildCommentDto> model = _commentManeger.GetChildCommentListByParentId(articleid, prentcommentid, page, pagesize, "CreationTime DESC");
14             return Json(model);
15         }

 

JS Post 传参

原文:http://www.cnblogs.com/yishilin/p/7411534.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!