Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <html>
- <head>
- <title> Password </title>
- <script language="JavaScript">
- function delete()
- {
- passw.value="";
- }
- function inspas(pass)
- {
- var passgiusta="a1b2c3d",i;
- var a=pass.length;
- if(a!=7)
- {
- alert("La password inserita non possiede 7 caratteri");
- delete;
- }
- else
- {
- for(i=2;i>0;i--)
- {
- if(pass==passgiusta)
- {
- document.write("<p style='font-size:30; color:RGB(0,255,0);'> BRAVO");
- window.close();
- }
- else
- {
- alert("sbagliato, ti rimangono:"+i "tentativi");
- delete;
- }
- }
- document.write("<p style=' font-size:30; color:RGB(255,0,0);'> SBAGLIATO!, la password corretta รจ:"+passgiusta);
- }
- }
- </script>
- </head>
- <body>
- <p style="font-size:40; color:RGB(0,0,255);"> INSERIRE LA PASSWORD </p>
- <p> <input type="text" name="passw" value="" size="30"> </p> <BR><BR>
- <p> <input type="button" name="pulsA" value="verifica" onClick="inspas(passw.value);"></p>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement