encode string in javascript

by Ramya 2010-01-11 20:53:27

Encode string in Javascript:

Use escape() to encode a string in javascript. This function encodes special characters, with the exception of: * @ - _ + . / ...

<script type="text/javascript">
document.write(escape("hscripts.com - Web Master Resource!!!!!........"));
</script>


O/P:
hscripts.com%20-%20Web%20Master%20Resource%21%21%21%21%21........

Tagged in:

1127
like
0
dislike
0
mail
flag

You must LOGIN to add comments