URLEncode and URLDecode – jQuery Plugin
Already written what is URLEncoding and Decoding all about. This post is just a try to understand a jQuery plugin for doing URLEncode and decode using javascript code. In case you need to send some variable url encoded or receive some variable encoded this plug-in can be used. Here is an example using this script.You can try encoding and decoding some strings below:
Here is the code :
$().ready(function() {
$("#buttonunrencode").click( function() {
$("#encodedtxt").val($.URLEncode($("#normaltxt").val()));
});
$("#buttonunrdecode").click( function() {
$("#normaltxt").val($.URLDecode($("#encodedtxt").val()));
});
});
<html><body> Normal Text : <input type="text" id="normaltxt" name="normaltxt" size="40"/> <input type="button" id="buttonunrencode" name="buttonunrencode" value="URLEncode"/> <br/><br/> Encoded Text : <input type="text" id="encodedtxt" name="encodedtxt" size="40"/> <input type="button" id="buttonunrdecode" name="buttonunrdecode" value="URLDecode"/> </body></html>
For more details Visit here
Most Commented Posts
If you enjoyed this post, please consider to leave a comment or subscribe to the feed and get future articles delivered to your feed reader.

it’s not working in your example…