开发者

Call a view with ajax inside jquery file

开发者 https://www.devze.com 2023-01-10 02:26 出处:网络
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 ver

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

精彩评论

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