-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathscrip.js
More file actions
29 lines (23 loc) · 1.11 KB
/
Copy pathscrip.js
File metadata and controls
29 lines (23 loc) · 1.11 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
function encriptado(){
var frase = document.getElementById("txtEncriptado").value.toLowerCase();
var txtEncriptado = frase.replace(/e/img, "enter");
var txtEncriptado = txtEncriptado.replace(/o/img, "ober");
var txtEncriptado = txtEncriptado.replace(/i/img, "imes");
var txtEncriptado = txtEncriptado.replace(/a/img, "ai");
var txtEncriptado = txtEncriptado.replace(/u/img, "ufat");
document.getElementById("txtDesecriptado").innerHTML=txtEncriptado;
}
function desencriptado(){
var frase = document.getElementById("txtEncriptado").value.toLowerCase();
var txtEncriptado = frase.replace(/enter/img, "e");
var txtEncriptado = txtEncriptado.replace(/ober/img, "o");
var txtEncriptado = txtEncriptado.replace(/imes/img, "i");
var txtEncriptado = txtEncriptado.replace(/ai/img, "a");
var txtEncriptado = txtEncriptado.replace(/ufat/img, "u");
document.getElementById("txtDesecriptado").innerHTML=txtEncriptado;
}
function copiando(){
var txtArea = document.querySelector("#txtDesecriptado");
txtArea.select();
document.execCommand("copy");
}