Improvements

master
zmv7 2022-02-12 13:32:58 +05:00 committed by GitHub
parent 03878b3999
commit 79fda4e13d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 3 deletions

View File

@ -12,11 +12,11 @@
string.value = "";
result.innerHTML = "";};
function Encode (){
result.innerHTML += 'Text: ' + string.value + '<br><br>' + 'base64: ' + window.btoa(string.value) + '<hr>';
result.innerHTML += 'Text:<br><code>' + string.value + '</code><br><br>' + 'Base64:<br><code>' + window.btoa(string.value) + '</code><hr>';
string.value = "";
string.focus();}
function Decode (){
result.innerHTML += 'base64: ' + string.value + '<br><br>' + 'Text: ' + window.atob(string.value) + '<hr>';
result.innerHTML += 'Base64:<br><code>' + string.value + '</code><br><br>' + 'Text:<br><code>' + window.atob(string.value) + '</code><hr>';
string.value = "";
string.focus();}
function Clear (){
@ -32,7 +32,7 @@
<div id="content">
<div class="inner">
<button onclick="Encode();">Encode</button> <button onclick="Decode();">Decode</button> <button onclick="Clear()">Clear</button><br><br>
<input type="text" name="string" id="string" style="width:calc(100% - 8px)"><br><br>
<input type="text" name="string" id="string" style="width:calc(100% - 8px)"><br><br><hr>
<div id="result"></div>
</div>
</div>