JS中decodeURI()与decodeURIComponent()区别
来源:互联网 发布:如何淘宝知识产权投诉 编辑:程序博客网 时间:2024/06/01 08:10
原址:http://blog.csdn.net/zyu67/article/details/43951653
摘要: 本文章就是介绍两个解码的函数,他们就是decodeURI()和decodeURIComponent()函数,这两个函数可以对特定函数生成的密码字符串进行解密操作,就可以生成为未解密的字符串,比较实用,下面
本文章就是介绍两个解码的函数,他们就是decodeURI()和decodeURIComponent()函数,这两个函数可以对特定函数生成的密码字符串进行解密操作,就可以生成为未解密的字符串,比较实用,下面来看看这两个函数的用法和实例,你就会用了:
decodeURI()定义和用法:decodeURI() 函数可对 encodeURI() 函数编码过的URI 进行解码。
语法:decodeURI(URIstring)
参数 描述:URIstring 必需。一个字符串,含有要解码的 URI 或其他要解码的文本。
返回值:URIstring 的副本,其中的十六进制转义序列将被它们表示的字符替换。
decodeURIComponent()定义和用法:decodeURIComponent() 函数可对 encodeURIComponent() 函数编码的 URI 进行解码。
语法:decodeURIComponent(URIstring)
参数 描述:URIstring 必需。一个字符串,含有编码 URI 组件或其他要解码的文本。
返回值:URIstring 的副本,其中的十六进制转义序列将被它们表示的字符替换。
实例:
其运行结果为:
http://www.wljcz.com/My%20first/
http://www.wljcz.com/My first/
http%3A%2F%2Fwww.wljcz.com%2FMy%20first%2F
http://www.wljcz.com/My first/
阅读全文
0 0
- JS中decodeURI()与decodeURIComponent()区别
- JS中decodeURI()与decodeURIComponent()区别
- JS中decodeURI()与decodeURIComponent()区别
- JS中decodeURI()与decodeURIComponent()区别
- JS中decodeURI()与decodeURIComponent()区别
- JS中decodeURI()与decodeURIComponent()区别
- JavaScript decodeURI()与decodeURIComponent()区别
- JavaScript decodeURI()与decodeURIComponent()区别
- encodeURI、decodeURI、encodeURIComponent与decodeURIComponent的区别
- java中URLEncoder、URLDecoder 与js中 en/decodeURI()、en/decodeURIComponent()使用
- js encodeURI() decodeURI() encodeURIComponent() decodeURIComponent()
- JS----编码,解码decodeURIComponent,encodeURIComponent,decodeURI,encodeURI
- escape()、encodeURI()、decodeURI()、encodeURIComponent()、decodeURIComponent()区别详解
- js中的编码解码--escape/unescape、encodeURI/decodeURI 、encodeURIComponent/decodeURIComponent
- 一张图看懂encodeURI、encodeURIComponent、decodeURI、decodeURIComponent的区别
- 一张图看懂encodeURI、encodeURIComponent、decodeURI、decodeURIComponent的区别
- unescape decodeURI decodeURIComponent
- unescape,decodeURI,decodeURIComponent
- shell下对文件夹的文件进行排序
- 51nod 1450 闯关游戏 期望dp
- 快速排序搜索一个数组中第N大的数字
- Linux—进程间通讯—信号量
- 查长时间运行事务
- JS中decodeURI()与decodeURIComponent()区别
- noteBook2.17-C#基础第十七天
- vxworks中断处理程序不能使用printf的本质
- Android与服务器通过Servlet进行双向通信
- centos 通过rsync实现远程文件同步
- python 3.X版本 利用urllib.request 通过制定的URL抓取网易内容
- codeblocks运行时提示Can't find compiler executabl...
- 字符集与编码
- 文章标题