JavaScript encodeURI 和encodeURIComponent

时间:2020-11-23 11:45:38
【文件属性】:
文件名称:JavaScript encodeURI 和encodeURIComponent
文件大小:45KB
文件格式:PDF
更新时间:2020-11-23 11:45:38
c encode encodeuri encodeURI和encodeURIComponet函数都是javascript中用来对URI进行编码,将相关参数转换成UTF-8编码格式的数据。URI在进行定位跳转时,参数里面的中文、日文等非ASCII编码都会进行编码转换。 这两个函数功能上面比较接近,但是有一些区别。  encodeURI:不会进行编码的字符有82个 :!,#,$,&,’,(,),*,+,,,-,.,/,:,;,=,?,@,_,~,0-9,a-z,A-Z  encodeURIComponent:不会进行编码的字符有71个:!, ‘,(,),*,-,.,_,~,0-9,a-z,A-Z 问题:   ajax.get ( u

网友评论