• 微信
您当前的位置: 首页> JavaScript> JavaScript>

JavaScript中对url进行编码:urlencode编码

作者:Alpha时间:2019-03-29 阅读数:12411 +人阅读

js中 urlencode编码  

encodeURIComponent(编码的具体内容)

url = encodeURIComponent("http://www.seoalphas.com/")

解码 decodeURIComponent(解码码的具体内容) 

decodeURIComponent(url)

原理:对URL的组成部分进行个别编码,而不用于对整个URL进行编码

本站所有文章、数据、图片均来自互联网,一切版权均归源网站或源作者所有。

如果侵犯了你的权益请来信告知我们删除。邮箱:595397166@qq.com

标签: 小程序

阿尔法

软件开发工程师#全栈工程师

{include file=foot.html}