JavaScript Encryption and Decryption 1.0
Code to do in-browser decryption
Hide the encrypted text and only show the decryption link
<a href="javascript:Decrypt_text('unique_name', 'The cipher text');">Show encrypted text</a>
<div id="unique_name"></div>
<a href="javascript:Decrypt_text('unique_name', 'The cipher text');">Show encrypted text</a>
<div id="unique_name"></div>
Show the encrypted text on the page along with a link to decrypt it
<a href="javascript:Decrypt_text('unique_name');">Decrypt text</a>
<div id="unique_name">The cipher text</div>