Home > DeveloperSection > Forums > encode the password by javascript
Varun Agrawal
Varun Agrawal

Total Post:3

Points:21
Posted on    March-29-2011 6:48 AM

 JavaScript JavaScript 
Ratings:


 1 Reply(s)
 1413  View(s)
Rate this:
How to encode and decode the password by javascript.
please give the syntax of this problem.


Amit Singh

Total Post:103

Points:721
Posted on    March-29-2011 7:33 AM

hello varun,
In javascript, we encode the password or any string by using the escape() method and decrypt the string by used unescape() methods.

for example
<script type="text/javascript">
  var strValue = "this is the new password";
 var strvalue1=document.writeln(escape(strValue));
 document.write(unescape(strvalue1));
</script>

Don't want to miss updates? Please click the below button!

Follow MindStick