Originariamente inviato da aquatimer2000
ciao a tutti,
ho due campi input text e su entrambi ho impostato maxlength=5
c'è uno script che mi permette, una volta che ho digitato i 5 caratteri sul primo input, di passare automaticamente all'input successivo ?
grazie in anticipo per le risposte!
cosi:
codice:
<!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=iso-8859-1" />
<title>Riempimento automatico</title>
</head>
<body><div id="container">
<div id="week">
<table width="359" border="0" cellspacing="0" cellpadding="2">
<tr>
<td width="176"><input name="testo0" type="text" id="testo0" maxlength="5" onkeyup="if(this.value.length == 5){document.getElementById('testo1').focus()}" /></td>
<td width="175"><input name="testo1" type="text" id="testo1" maxlength="5" /></td>
</tr>
</table>
</div>
</div></body>
</html>