If you have a callback such as:

如果您有回调,例如:

function(data) {
  process(data);
 }

what exactly is data? How would you specify what data is if the url that the POST request is sent to redirects to your controller (let's say we're using Ruby on Rails.)?

究竟是什么数据?如果发送POST请求的url重定向到你的控制器,你会如何指定哪些数据(假设我们正在使用Ruby on Rails)?

2 个解决方案

#1


0

data is the response from the server.

data是服务器的响应。

Depending on the type of the jQuery AJAX request, it will be either a string, a parsed JSON object, or an XML DOM tree.

根据jQuery AJAX请求的类型,它将是字符串,解析的JSON对象或XML DOM树。

See the documentation.

请参阅文档。

更多相关文章

  1. 如何在Ajax.ActionLink中获取表单中的输入数据?
  2. 通过],[和创建json对象来分割字符串
  3. jQuery返回一个没有逗号的字符串的前5个单词
  4. 开发学习Jquery实例---双击表格弹出模态对话框,编辑提交数据
  5. 执行Django数据库值的计算:视图。py或Javascript模板吗?
  6. 将Object转换为字符串并返回[复制]
  7. 带有括号的某些字符串导致Ajax POST操作失败,出现403错误(禁止)
  8. jquery 如何获取json指定键为指定值的另一个指定键的值,该值还是
  9. Jquery 传json格式数据到后台,后台反序列化得到一个集合list

随机推荐

  1. Android消息处理机制笔记
  2. android底部栏中间按钮突出
  3. listview超强优化
  4. 第一行代码 第三章 RecyclerView
  5. Android——ViewPager和Fragment混合使用
  6. androidSDK下的图片资源
  7. android 文本中使用超链接
  8. Android获得手机信息
  9. android Launcher3应用列表修改透明背景
  10. Android 开发指南文档的部分中文翻译