JavaScript js 中嵌入 ruby 代码

sforce100 · November 07, 2012 · Last by hellolucky123 replied at November 07, 2012 · 2811 hits

在 js 里面我可以这样拼接 url 吗 var $search_url = <% url_for :controller => "plan", :action => "show" %> + $Text_search.val() + ".json"

在檔名後面加個.erb

You need to Sign in before reply, if you don't have an account, please Sign up first.