File tree Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -28,8 +28,8 @@ <h1>Encriptador<br>
28
28
< textarea id ="inputTextArea " rows ="18 " cols ="40 " placeholder ="Ingrese texto aquí " class ="campotransparente-uno "> </ textarea >
29
29
< p > Solo letras minusculas y sin acentos</ p >
30
30
< 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 >
33
33
</ div >
34
34
</ div >
35
35
< div class ="output "> < textarea id ="result " rows ="18 " cols ="32 " class ="campotransparente-dos "> </ textarea > < br >
Original file line number Diff line number Diff line change @@ -9,6 +9,8 @@ function encryptText() {
9
9
. replace ( / o / g, 'ober' )
10
10
. replace ( / u / g, 'ufat' ) ;
11
11
resultTextArea . value = encryptedText ;
12
+ var inputElement = document . getElementById ( 'inputTextArea' ) ;
13
+ inputElement . value = '' ;
12
14
}
13
15
14
16
function decryptText ( ) {
@@ -21,9 +23,7 @@ function decryptText() {
21
23
. replace ( / i m e s / g, 'i' )
22
24
. replace ( / e n t e r / g, 'e' ) ;
23
25
resultTextArea . value = decryptedText ;
24
- }
25
-
26
- function limpiarTextarea ( ) {
27
26
var inputElement = document . getElementById ( 'inputTextArea' ) ;
28
27
inputElement . value = '' ;
29
28
}
29
+
You can’t perform that action at this time.
0 commit comments