rails是否支持:accesskey属性中的左右箭头键?
= link_to "< Previous", @vehicle.previous, :accesskey => "LEFT ARROW"
= link_to "Next >", @vehicle.next, :accesskey => "RIGHT ARROW"
答案 0 :(得分:2)
这不是轨道责任。可能你需要一些js插件,将关键按键绑定到链接。
如果您想在生成的<a>
代码中添加一些属性,请使用:html_options
密钥
= link_to "< Previous", @vehicle.previous, :html_options => {:accesskey => "LEFT ARROW"}