我有以下代码:
<table id = "mytable">
<tbody>
<% @event.each do |event| %>
<!-- call javascript function here -->
do_stuff ( <%= event %>)
<% end %>
</tbody>
</table>
结果是:
do_stuff(#<Event:0x1118119d> do_stuff(#<Event:0x432c632f> do_stuff(#<Event:0x1723c51d> do_stuff(#<Event:0x2d61fec9> do_stuff(#<Event:0x7c9e5565> do_stuff(#<Event:0x7ef899cd> do_stuff(#<Event:0x7339a2da>
调用 javascript 函数 do_stuff 的正确语法是什么?