URL Decoder/encoder --

Source: Internet
Author: User

Source: http://www.z4.cn/bbs/showthread.php? Threadid = 2939

<! Doctype HTML public "-// W3C // dtd html 4.0 // en" "http://www.w3.org/TR/REC-html40/strict.dtd">
<HTML>
<Head>
<Title> URL Decoder/encoder </title>
<Style type = "text/CSS">
<! --
Body {Background: white; color: black ;}
FORM {margin: 0 ;}
H1 {font-family: Arial, sans-serif; line-Height: 0.85em; border-bottom: 2px solid; margin-bottom: 0.33em; padding-bottom: 0 ;}
Textarea {Background: # Eef ;}
# Footer {border-top: 1px solid #000; color: #999; Font: italic 75% sans-serif ;}
# Footer P {margin: 0 0 1em 0 ;}
# Footer IMG {float: Right; margin: 0 0 0.5em 2em ;}
-->
</Style>
<SCRIPT type = "text/JavaScript">
Function encode (){
VaR OBJ = Document. getelementbyid ('dencoder ');
VaR unencoded = obj. value;
OBJ. value = escape (unencoded );
}
Function decode (){
VaR OBJ = Document. getelementbyid ('dencoder ');
VaR encoded = obj. value;
OBJ. value = Unescape (encoded. Replace (// +/g ,""));
}
</SCRIPT>
</Head>
<Body> <form onsubmit = "Return false;"> <Textarea Cols = "80" rows = "20" id = "dencoder"> </textarea>
<Div> <input type = "button" onclick = "decode ()" value = "decode">
<Input type = "button" onclick = "encode ()" value = "encode"> </div>
<Ul> <li> input a string of text and encode or decode it as you like. </LI>
<Li> handy for turning Encoded javascript URLs from complete gibberish into readable gibberish. </LI>
<Li> if you 'd like to have the URL Decoder/encoder for offline use, just View Source and save to your hard drive. </LI> </ul> </form>
</Body>
</Html>

URL Decoder/Encoder
Not nearly as cool or flashy as the color blender, it's still useful for situations where a massively long Encoded URL needs to be decoded. I wrote this one for me, But figured I 'd throw it up here for anyone else who needed it.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.