-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
76 lines (60 loc) · 2.54 KB
/
Copy pathindex.html
File metadata and controls
76 lines (60 loc) · 2.54 KB
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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>ENCRIPTADOR</title>
<link rel="stylesheet" href="reset.css">
<link rel="stylesheet" href="encriptastyle.css">
</head>
<body>
<header>
<h1> <img src="Logo.png"></h1>
</header>
<input type="text" id="output" class="texto2">
<div>
<img src="dibujo.png" id="muñeco">
<img src="Frame5.png" id="framecinco">
</div>
<div class="ingreseTexto">
<textarea id class="texto1" placeholder="Ingrese el texto aqui" required autocomplete="off"></textarea>
<p>Solo letras minusculas y sin acentos</p>
</div>
<button onclick='encriptar()' id="botonencriptar">Encriptar</button>
<button onclick='desencriptar()' id="botondesencriptar">Desencriptar</button>
<button onclick='copiar()' id="copiar">Copiar</button>
<button onclick='finalizar()' id="fin">Finalizar</button>
<script>
var textarea = document.querySelector("textarea");
var input = document.querySelector("input");
function encriptar() {
var mensajeEncrip = (textarea.value).replace(/e/g, "enter").replace(/i/g, "imes").replace(/a/g, "ai").replace(/o/g, "ober").replace(/u/g, "ufat");
input.value = (mensajeEncrip);
document.getElementById("framecinco").style.opacity = "0";
document.getElementById("muñeco").style.opacity = "0";
(textarea.value) = "";
}
function copiar() {
textarea.value = output.value;
(input.value) = "";
document.getElementById("framecinco").style.opacity = "1"
document.getElementById("muñeco").style.opacity = "1"
}
function desencriptar() {
var mensajedesencriptado = (textarea.value).replace(/enter/g, "e").replace(/imes/g, "i").replace(/ai/g, "a").replace(/ober/g, "o").replace(/ufat/g, "u");
output.value = (mensajedesencriptado);
document.getElementById("framecinco").style.opacity = "0";
document.getElementById("muñeco").style.opacity = "0";
(textarea.value) = "";
}
function finalizar(){
(output.value) = "";
document.getElementById("framecinco").style.opacity = "1";
document.getElementById("muñeco").style.opacity = "1";
(output.value) = "";
}
</script>
</body>
<footer>
<p class="pie"> ©Copyrigth Patricia Flores </p>
</footer>
</html>