JavaScript - URGENTE POR FAVOR, RECARGAR

 
Vista:

URGENTE POR FAVOR, RECARGAR

Publicado por boris (2 intervenciones) el 12/01/2018 16:36:11
BUENAS, NECESITO AYUDA CON UN CODIGO, BIEN QUISIERA QUE CUANDO SE SUPEREN LOS INTENTOS AL PRESENTAR ESTO:
1
2
3
4
5
6
7
if(x==3)
{
	document.write("<br /><b>INTENTOS SUPERADOS</b><br />");
	document.write("<br /><b>PROGRAMA BLOQUEADO</b><br />");
	document.write("<br /><b>POR FAVOR VUELVA A CARGAR LA PAGINA</b><br />");
 
}
TAMBIEN SALGA UN BOTON O ALGUNA PALABRA EN LA QUE AL DAR CLICK SE RECARGUE LA PAGINA

CODIGO COMPLETO:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
<!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=utf-8" />
<title>Documento sin título</title>
</head>
 
<body>
<script type="text/javascript">
window.onload=function(){
if(document.getElementById('vista').value= 'Cerrada')
{
document.getElementById('vista').style.display = 'none';
}
}
var x=0;
function verificar()
{
	x=x+1;
	var clave=document.getElementById('clave').value;
	var usuario=document.getElementById('usu').value;
 
	if(usuario=="kevin" && clave=="123")
	{
		alert('Iniciando Sesion');
		document.getElementById('vista').style.display = '';
		document.getElementById('Enviar').style.display = 'none';
		document.getElementById('Imprimir').style.display = 'none';
		document.getElementById('Cerrar').style.display = 'none';
	}
	else
	{
		alert('Usuario o Contraseña incorrecta');
		if(x==3)
		{
			document.write("<br /><b>INTENTOS SUPERADOS</b><br />");
			document.write("<br /><b>PROGRAMA BLOQUEADO</b><br />");
			document.write("<br /><b>POR FAVOR VUELVA A CARGAR LA PAGINA</b><br />");
 
	}
	}
}
</script>
<form>
<img src="logo_footer1.png" alt="Imagen" /><br />
Ingrese su Usuario:
<input type="text" id="usu" /><br />
Ingrese su Clave:
<input type="password" id="clave" /><br />
<p><a id="vista" href="proyecto part3.html">Siguiente</a></p>
<input type="button" id="Enviar" value="Enviar" onclick="verificar()" />
<input type="button" id="Imprimir" onclick="javascript:print();" value="Imprimir" />
<input type="button" Id="Cerrar" onclick="window.close();" value="Terminar" />
</form>
</body>
</html>
BUENAS Y MUCHAS GRACIAS
Valora esta pregunta
Me gusta: Está pregunta es útil y esta claraNo me gusta: Está pregunta no esta clara o no es útil
0
Responder