I have a Javascript code for decryption, now i want to display the decryption string inside a div. I have tried using the following code.
<script src="http://crypto-js.googlecode.com/svn/tags/3.1.2/build/rollups/aes.js"></script>
<script>
var decrypted = CryptoJS.AES.decrypt("dsfsdffd", "dsfsdf");
var dec = decrypted.toString(CryptoJS.enc.Utf8);
document.getElementById("display1").innerHTML = dec;
</script>
<div id="display1"></div>
But the above code not working. What i have done wrong. Is there any solution.
decisempty string. Try thisdocument.getElementById("display1").innerHTML = "abc";//dec;and you will see