开发者

Call a view with ajax inside jquery file

I have a jquery file from which I'd like to call a view. The action at the controller is called Inbox. What i开发者_JS百科s the right way to call this action from the jquery file?


Your question is very vague and strangely formulated, but i suppose you're looking for jquery assistance.

jQuery offers many ways to do an ajax call. The easiest one is load() $('#container').load('path/to/file.html');


when calling an ajax, your data must be a json object

$.ajax({
  type: "get",
  url: "planning/inbox",
  data: { s.Site: searchSite, s.Date: SearchDate }
})
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜