Jump to content
Gilberto Jr

Mudança de Campo no Formulário com o "ENTER"

Recommended Posts

Boa tarde;

 

Eu tenho esse formulário

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Formulario Simples</title>
</head>

<body>
<div id="comentario">
<form name="coment" id="coment" method="post" action="">
<fieldset>
<legend>Deixe sua mensagem</legend>
<table width="350" border="0">
<label>
  <tr>
    <td>
    <span>Nome: </span>
    </td>
  </tr>
  <tr>
    <td><input type="text" name="nome" value="" /></td>
  </tr>
 </label>
 <label>
  <tr>
    <td><span>E-mail: </span></td>
  </tr>
  <tr>
    <td><input type="text" name="email" value="" /></td>
  </tr>
  </label>
  <label>
  <tr>
    <td><span>comentario: </span></td>
  </tr>
  <tr>
    <td>
	<textarea name="comentario"></textarea></td>
  </tr>
  </label>
  <tr>
    <td><P><input type="submit" name="enviar" value="enviar" class="bot_envia" /></P></td>
  </tr>
</table>
</fieldset>
</form>
</div>

</body>
</html>

Dai eu quero mudar para o próximo campo quando eu pressionar a tecla ENTER do teclado e não fazer o submit no formulário.

 

Como eu devo fazer para funcionar esse processo?

 

Att;

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×

Important Information

Ao usar o fórum, você concorda com nossos Terms of Use.