rails 中添加ajax

rails 中添加ajax

在你的 html.erb 中的链接或者按钮 这样添加:&lt%= button_to 'ajax test' ,example_path , :remote=true%&gt在你的controller
JavaScript170