URL 编码
Javascript 有两个常用的URI编码函数:encodeURI和encodeURIComponent
encodeURI方法不会对下列字符编码
英文字母 阿拉伯数字 ~!@#$&*()=:/,;?+’
encodeURIComponent方法不会对下列字符编码
英文字母 阿拉伯数字 ~!*()’
所以encodeURIComponent比encodeURI编码的范围更大。
Javascript 有两个常用的URI编码函数:encodeURI和encodeURIComponent
encodeURI方法不会对下列字符编码
英文字母 阿拉伯数字 ~!@#$&*()=:/,;?+’
encodeURIComponent方法不会对下列字符编码
英文字母 阿拉伯数字 ~!*()’
所以encodeURIComponent比encodeURI编码的范围更大。