encode string in javascript
by Ramya[ Edit ] 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........