代码如下://把编码转换成 gb2312编码 function UrlEncode(str) { var i, c, ret=””, strSpecial=”!\”#$%&'()*+,/:;<=>?@[\]^`{|}~%”; for(i = 0; i < str.length; i++) { //alert(str.charCodeAt(i)); c = str.charAt(i); if(c==” “) ret+=”+”; else if(strSpecial.indexOf(c)!=-1) ret += “%” + str.charCodeAt(i).toString
2021-10-19 10:16:28
24KB
AS
asc
c
1