Código HTML:
<form name="User" method="POST" enctype="application/x-www-form-urlencoded" action="entrar.php"> <div id="Usuario"> <input type="text" name="User" value="asd" class="texto-buscar" size="24"> </div> <div id="Pass"> <input type="text" name="Pass" onkeydown="entrar();" value="paas" class="texto-buscar" size="24"> </div> </form>
Código HTML:
function entrar(){ var tecla; function capturaTecla(e) { if(document.all) tecla=event.keyCode; else { tecla=e.which; } if(tecla==13) { document.forms[0].submit(); } } document.onkeydown = capturaTecla; }
Gracias.
![Adios](http://static.forosdelweb.com/fdwtheme/images/smilies/adios.gif)