2013-05-18 122 views
0

軌道是否支持:accesskey屬性中的左右箭頭鍵?左右箭頭的導軌訪問鍵?

= link_to "< Previous", @vehicle.previous, :accesskey => "LEFT ARROW" 
= link_to "Next >", @vehicle.next, :accesskey => "RIGHT ARROW" 

回答

2

這不是鐵路的責任。可能你需要一些js插件,將按鍵綁定到鏈接。

如果你想添加一些屬性到產生<a>標籤,使用:html_options關鍵

= link_to "< Previous", @vehicle.previous, :html_options => {:accesskey => "LEFT ARROW"}