Subscribe

RSS Feed (xml)

Powered By

Skin Design:
Free Blogger Skins

Powered by Blogger

Wednesday, August 20, 2008

Enter on Javascript

If you need to capture the enter keypress on a webpage for example for submitting a form, you can do it with something like that:


tecla_pulsada = (document.all) ? e.keyCode : e.which;
if (tecla_pulsada==13){ //hacer lo que sea }

No comments: