Código Javascript:
Ver original
<head> <script language="javascript" type="text/javascript"> function validarfrm(frm){ if(frm.pass.value!=frm.password2.value){ alert ("Las contraseñas no coinciden. Por favor vuelva a intentar"); frm.pass.value=''; frm.password2.value=''; frm.pass.focus(); return false; } }//cierra funcion frm </script> </head>
Código HTML:
Ver original
<body> <FORM id="miForm3" NAME="formulario" METHOD="post" onSubmit="return validarfrm(this)"> Contraseña:<input class="required" type="password" name="pass" MAXLENGTH="20"> Confirmar Contraseña:<input class="required" type="password" name="password2" MAXLENGTH="20"> <input class="submit" type="submit" name="enviar" value="Registrar"/> </form> </body>