encodeURIComponent 转义除了字母 数字 ( ) . ! ~ * ' - 和_ 之外的所有字符。
encodeURIComponent
(
)
.
!
~
*
'
-
_
为了避免服务器收到不可预知的请求,对任何用户输入的作为URI部分的内容你都需要用encodeURIComponent进行转义。