Skip to content

Commit

Permalink
Encriptador casi update...
Browse files Browse the repository at this point in the history
  • Loading branch information
mrp500 committed Mar 3, 2024
1 parent f88144c commit 5a36d91
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ <h1>Encriptador<br>
<textarea id="inputTextArea" rows="18" cols="40" placeholder="Ingrese texto aquí" class="campotransparente-uno"></textarea>
<p>Solo letras minusculas y sin acentos</p>
<div style="text-align: center;">
<button class="button-uno" onclick="encryptText(), limpiarTextarea();">Encriptar!</button>
<button class="button-dos" onclick="decryptText(), limpiarTextarea();">Desencriptar!</button>
<button class="button-uno" onclick="encryptText();">Encriptar!</button>
<button class="button-dos" onclick="decryptText();">Desencriptar!</button>
</div>
</div>
<div class="output"><textarea id="result" rows="18" cols="32" class="campotransparente-dos"></textarea><br>
Expand Down
6 changes: 3 additions & 3 deletions script.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ function encryptText() {
.replace(/o/g, 'ober')
.replace(/u/g, 'ufat');
resultTextArea.value = encryptedText;
var inputElement = document.getElementById('inputTextArea');
inputElement.value = '';
}

function decryptText() {
Expand All @@ -21,9 +23,7 @@ function decryptText() {
.replace(/imes/g, 'i')
.replace(/enter/g, 'e');
resultTextArea.value = decryptedText;
}

function limpiarTextarea() {
var inputElement = document.getElementById('inputTextArea');
inputElement.value = '';
}

0 comments on commit 5a36d91

Please sign in to comment.