leoretorico Posted February 23, 2013 at 09:02 PM Report #496783 Posted February 23, 2013 at 09:02 PM Boa tarde amigos! Como posso no código abaixo acrescentar uma mensagem se os campos não estiverem preenchidos?E no campo senha(password) ocultar os dados digitados com **** ??? <script type="text/javascript"> <!-- function authPass(u,p) { if (u && p) self.location = "auth.htm?" + u + p; return false; } // --> </script> <div> <script type="text/javascript"> <!-- if (location.search.indexOf("auth=failed") != -1) { document.write("<span style=\"color:#ff0000\">Acesso negado! Verifique seu login</span>"); } // --> </script> <form id="form1" action="javascript://" onsubmit="return authPass(this.user.value,this.pass.value)"> <table> <tr> <td>Usuário: </td><td><input type="text" name="user" /></td> </tr> <tr> <td>Senha: </td><td><input type="text" name="pass" /></td> </tr> <tr> <td colspan="4" align="left"><input type="submit" value="Login" /><input type="button" name="reset_form" value="Limpar campos" onclick="this.form.reset();" /></td> </tr> </table> </form> </div>
yoda Posted February 23, 2013 at 09:13 PM Report #496784 Posted February 23, 2013 at 09:13 PM Foste tu quem fez o código? before you post, what have you tried? - http://filipematias.info sense, purpose, direction
fteixeira1993 Posted February 24, 2013 at 09:51 AM Report #496821 Posted February 24, 2013 at 09:51 AM (edited) <input type="password" name="pass"> E no campo senha(password) ocultar os dados digitados com **** ??? <input type="password" name="pass"> Edited February 24, 2013 at 09:48 AM by fteixeira1993
leoretorico Posted February 24, 2013 at 03:28 PM Author Report #496857 Posted February 24, 2013 at 03:28 PM Obrigado amigo..agora o password fica oculto ao digitar! Mas como posso exibir uma mensagem se não for digitado nada e o usuário clicar no botão login?
fteixeira1993 Posted February 24, 2013 at 05:47 PM Report #496875 Posted February 24, 2013 at 05:47 PM (edited) http://social.msdn.microsoft.com/Forums/pt/aspnetpt/thread/546a4888-7805-4299-9022-a026ba35feca Espero que ajude 🙂 cumps, fteixeira1993 Edited February 24, 2013 at 05:59 PM by fteixeira1993
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now