decodeURIComponent()函数和encodeURIComponent()函数

decodeURIComponent()函数可对encodeURIComponent()函数编码的URI进行解码

用法:decodeURIComponent(URIstring)

URIstring

必需。一个字符串,含有编码 URI 组件或其他要解码的文本。

encodeURIComponent() 函数

作用:可把字符串作为URI 组件进行编码。其返回值URIstring 的副本,其中的某些字符将被十六进制转义序列进行替换。

猜你喜欢

转载自blog.csdn.net/m0_73461567/article/details/128926954