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.
精彩评论