Modificar una variable global desde una función
Publicado por Irving (1 intervención) el 23/05/2020 00:19:12
Al momento de usar el Login no detecta nada
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
<script type="text/javascript">
var value;
function mostrarPremio() {
document.getElementById('premio').style.display = 'block';
document.getElementById('triste').style.display = 'none';
}
function ocultarPremio() {
document.getElementById('premio').style.display = 'none';
document.getElementById('triste').style.display = 'block';
}
function Login(){
if (document.form.password.value=='UNU' && document.form.login.value=='UWU'){
value = value+1;
}
}
function ajax() {
if (value==1)
{
mostrarPremio();
}
else{
ocultarPremio();
}
}
</script>
Valora esta pregunta


0