Skip to content

Commit 5a36d91

Browse files
committed
Encriptador casi update...
1 parent f88144c commit 5a36d91

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

index.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@ <h1>Encriptador<br>
2828
<textarea id="inputTextArea" rows="18" cols="40" placeholder="Ingrese texto aquí" class="campotransparente-uno"></textarea>
2929
<p>Solo letras minusculas y sin acentos</p>
3030
<div style="text-align: center;">
31-
<button class="button-uno" onclick="encryptText(), limpiarTextarea();">Encriptar!</button>
32-
<button class="button-dos" onclick="decryptText(), limpiarTextarea();">Desencriptar!</button>
31+
<button class="button-uno" onclick="encryptText();">Encriptar!</button>
32+
<button class="button-dos" onclick="decryptText();">Desencriptar!</button>
3333
</div>
3434
</div>
3535
<div class="output"><textarea id="result" rows="18" cols="32" class="campotransparente-dos"></textarea><br>

script.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ function encryptText() {
99
.replace(/o/g, 'ober')
1010
.replace(/u/g, 'ufat');
1111
resultTextArea.value = encryptedText;
12+
var inputElement = document.getElementById('inputTextArea');
13+
inputElement.value = '';
1214
}
1315

1416
function decryptText() {
@@ -21,9 +23,7 @@ function decryptText() {
2123
.replace(/imes/g, 'i')
2224
.replace(/enter/g, 'e');
2325
resultTextArea.value = decryptedText;
24-
}
25-
26-
function limpiarTextarea() {
2726
var inputElement = document.getElementById('inputTextArea');
2827
inputElement.value = '';
2928
}
29+

0 commit comments

Comments
 (0)