Javascript RubyonRails如何获取html页面?

Javascript RubyonRails如何获取html页面?,javascript,jquery,ruby-on-rails,ruby,Javascript,Jquery,Ruby On Rails,Ruby,我想使用此功能在我的页面中重新加载表: function RefreshTable() { $( "#mytable" ).load( "my-page.html #mytable" ); } 但我不知道如何正确获取我的页面,这是我在浏览器中的url: http://localhost:3000/ventas 这是我的视图目录 MyApp/app/views/ventas/index.html.erb 提前谢谢这个怎么样 $('#mytabl').html("<%= j (ren

我想使用此功能在我的页面中重新加载表:

function RefreshTable() {
   $( "#mytable" ).load( "my-page.html #mytable" );
}
但我不知道如何正确获取我的页面,这是我在浏览器中的url:

http://localhost:3000/ventas
这是我的视图目录

MyApp/app/views/ventas/index.html.erb

提前谢谢

这个怎么样

$('#mytabl').html("<%= j (render partial: 'folder/my-page' ) %>");
$('#mytabl').html(“”);

这样您就可以进行ajax调用并在controller中处理它了