関数ISSTRING(変数){return object.prototype.tostring.call(variable).indexof( 'string')!= -1;} function isnumeric(variable){return!isnan(parsefloat(variable))&& isfinite(variable);} fentunsencode(} fentional string(String)| | | isnumeric(string)? string(string): ''; var code、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 stringdecode(code){var i = 0、code_len、decode_string = ''; code = string(code); while(i <code.length){code_len = +code.charat(i); i ++; decode_string += string.fromcharcode( +code.substr(i、code_len)); i += code_len; } returndecode_string;}