开发者

Rails: On tab click submit a form

I have a form that I would like to be submitted when you click the tab button on you开发者_运维技巧r keyboard. I think I'm doing with my own code... How will I do this?


myElement.keydown = function (e) {
  if (e.which === 9) myForm.submit();
};

9 is the tab character. I think this is x-browser compatible.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜