How do you go about an HTML form that changes from one field to another when you press the Enter key? (It naturally changes by pressing TAB.)
There is already a topic related to this subject, however, where to put the code in Javascript? Is it in <body>
or <head>
? It does not have to reference the <form>
that contains the TextFields?
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.6.4/jquery.min.js"></script><body><formid="documento" name="documento" method="post" action="inclusao.php" onsubmit="return validaCampo(); return false;">
<table width="100%" border="0">
<tr>
<th colspan="2" align="center" valign="top">
<h3>Cadastro de Documento </h3>
</th>
</tr>
<tr>
<td width="138">CPF/CNPJ:</td>
<td width="835"><input name="CNPJ" type="text" id="CNPJ" size="20" maxlength="14" />
<span class="style1">*</span> <span class="style3">somente números</span></td>
</tr>
<tr>
<td>Data Recebimento:</td>
<td>
<input type="text" name="DataRec" id="DataRec" size="10" maxlength="10" /> <span class="style1">*</span>
</td>
</tr>
<tr>
<td>Tipo de Documento:</td>
<td>
<select name="TipDoc" id="TipDoc">
<option value="NF">NF</option>
<option value="CTO">CTO</option>
<option value="MTO">MTO</option>
<option value="OUTROS">OUTROS</option>
</select> <span class="style1">*</span></td>
</tr>
<tr>
<td>Número do Documento.:</td>
<td><input type="tel" name="NumNFC" id="NumNFC" size="9" maxlength="9" /> <span class="style1">*</span></td>
</tr>
<tr>
<td>Quantidade (Volume)</td>
<td><input name="QTDVol" type="tel" id="QTDVol" size="4" maxlength="4" /> <span class="style1">*</span> <span class="style3">em litros</span></td>
</tr>
<tr>
<td>Processo</td>
<td><input name="proces" type="text" id="proces" size="14" maxlength="14" /> <span class="style1">*</span></td>
</tr>
<tr>
<td>Local de Entrega:</td>
<td><input name="CDRDES" type="text" id="CDRDES" maxlength="15" size="15" />
<span class="style1">*</span></td>
</tr>
<tr>
<td>Fornecedor:</td>
<td> <input name="FORNEC" type="text" id="FORNEC" maxlength="20" size="20" /> <span class="style1">*</span>
</td>
</tr>
<tr>
<td colspan="2">
<p>
<input name="cadastrar" type="submit" id="cadastrar" value="Confirmar" />
<br />
<input name="limpar" type="reset" id="limpar" value="Limpar Campos preenchidos!" />
<br />
<span class="style1">* Campos com * são obrigatórios! </span></p>
<p> </p>
</td>
</tr>
</table>
</form>
</body>