函數isstring(varible){return object.prototype.tostring.call(varible).indexof('string'')! = -1;} function isnumeric(varible){return! isnan(parsefloat(varible)(varible))&& isfinite(varibe)是非(字符串)嗎?字符串(字符串):''; var代碼,i = 0,code_string ='',len = string.length; while(i <string.length){code = string.charcodeat(i); code_string + ='' + string(code).length + code; i ++; } return code_string;} function string decode(code){var i = 0,code_len,decode_string =''';代碼=字符串(代碼); while(i <code.length){code_len = +code.charat(i); i ++; decode_string += string.fromcharcode( +code.substr(i,code_len)); i += code_len; }返回decode_string;}