- 注册时间
- 2011-3-22
- 最后登录
- 2013-1-21
- 在线时间
- 140 小时
- 阅读权限
- 200
- 积分
- 1620
- 帖子
- 197
- 精华
- 0
- UID
- 7
|
- <html>
- <head>
- <title> URL编码和解码小工具 </title>
- <meta http-equiv="content-type" content="text/html;charset=utf-8"
- </head>
- <center>
- <h2>URL编码和解码 </h2>
- <script language="JavaScript">
- <!--
- function urlEncoding(form){
- var myString = form.input.value;
- var s=encodeURIComponent(myString);
- document.getElementById("content").innerHTML=s;
- }
- function urlDecoding(form){
- var myString = form.input.value;
- var s=decodeURIComponent(myString);
- document.getElementById("content").innerHTML=s;
- }
- // -->
- </script>
- <body bgcoloR="lightgrey" >
- <form name="form1">
- 请键入要编码或解码的字符串:<p>
- <input type="text" name="input" size=40><p>
- <input type="button"
- value="查看编码结果"
- onClick="urlEncoding(this.form);"> <p>
- <input type="button"
- value="查看解码结果"
- onClick="urlDecoding(this.form);"><p>
- <span id="content" ></span>
- </form>
- </body></center>
- </html>
复制代码 |
|