Código:
<html> <head> <title>Ubicacion</title> </head> <body><center> <table width="27%" border="1"> <tr> <td>BETA</td> </tr> <tr> <td><form onSubmit="CheckForm()" id="ubicacion" name="ubicacion" method="post"> <label>codigo: <input name="codigo" type="text" maxlength="5" /> </label> <input type="submit" name="aceptar" id="aceptar" value="Aceptar" /> <Script language="javascript"> function CheckForm() { if (ubicacion.codigo_chofer.value == "0001") { ubicacion.action="ubicacion01.html" } else { alert('Ha introducido un codigo que no existe, vuelva a intentar'); } } </Script> </form></td> </tr> </table> </center></body> </html>