// Convert the encoding to gb2312 encoding 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 (16); If (Z [Str. charcodeat (I)]! = NULL) {d = Z [Str. charcodeat (I)]; try {RET + = "%" + D. slice (0, 2) + "%" + D. slice (-2);} catch (e) {alert ("$ error name =" + E. name + ", message =" + E. message + ", D" + I + "=" + Str. charcodeat (I)} else RET + = C;} return ret;} function getspell (STR, SP) {var I, C, T, ret = ""; if (sp = NULL) sp = ""; for (I = 0; I <Str. length; I ++) {If (Str. charcodeat (I)> = 0x4e00) {c = parseint (Z [Str. charcodeat (I)], 16); If (C <55290) {for (t = qswhspell. length-1; t> 0; t = T-2) if (qswhspell [T] <= C) break; If (T> 0) RET + = qswhspell [t-1] + SP ;}} areturn ret. substr (0, Ret. length-sp.length );}