Hello Mike and all, Sorry, I also have a question about keypresses. I need a form to be submitted by pressing Ctrl+Enter. How do I manage to do that? Thanks!
-- With best regards from Ukraine, Andre Skype: Francophile; Wlm&MSN: arthaelon @ yandex.ru; Jabber: arthaelon @ jabber.org Yahoo! messenger: andre.polykanine; ICQ: 191749952 Twitter: m_elensule ----- Original message ----- From: Mean Mike <mcgra...@gmail.com> To: jQuery (English) <jquery-en@googlegroups.com> Date: Thursday, December 17, 2009, 9:06:36 PM Subject: [jQuery] Re: What is the event when a user presses the enter key anywhere on the page? keypress $(document).keypress(function(e) { if ((e.which && e.which == 13) || (e.keyCode &&e.keyCode == 13)) { // do something } }); mean mike On Dec 17, 2:03 pm, "laredotorn...@zipmail.com" <laredotorn...@zipmail.com> wrote: > Hi, > > I would like to capture the event of pressing enter anywhere on the > page, even if the focus of the mouse cursor is not on a text field. > What event/element am I looking at? > > Thanks, - Dave