我爱占星网 我爱占星网
首页
编程
java
php
前端
首页 编程 java php 前端

jQuery Rails-.post数据

Here is the code in my application.js file:

  this.change(function() {
    $.post("dvbd", {id: this.val()}, null, "script");
  });

Here is what is in dvbd.js.erb:

$("#dave").html(:id);

What I'm trying to do is when this changes, the dave div has the value of this as its html. So I guess my question is how would I use the data sent using .post in my js.erb file?

$("#dave").html("<%= params[:id] %>");

近期文章

  • Ajax打印错误
  • 自动点击闪光按钮
  • $ .ajax不是函数
  • Ajax调用WebMethod
  • jQuery ajax fileupload [关闭]
  • Ajax POST上的错误XML
  • 自动刷新DIV,无需PHP
  • Ajax搜索帖子错误
  • jQuery AJAX分析器错误
  • 暂存dojo请求
  • jQuery Ajax和PHP取消链接
  • 为什么会一直显示正在加载ajax图像?
  • $ .post成功$ .post
  • rails和ajax请求
  • 为什么这个法线的解法是正确的? 是否可以提供算法的证明文章?
  • 如何判断常微分方程组解的特征(混沌/稳定)?
  • 含密码的约瑟夫环问题,要求顺序表和链表两种形式解决问题。
  • 以二叉树链表为存储结构,实现二叉树的创建和建立。
  • 输入指定的边数和顶点数建立图,并输出深度优先遍历和广度优先遍历的结果。
  • Java语言编写的程序,怎么把代码部分加密,防止被看到是通过什么代码方式实现的

Copyright ©2022 我爱占星 All Rights Reserved.

浙ICP备2022030071号-1

部分图文来自网络,如有侵犯您的版权,请告诉我们删除

友情链接:代码精华