function enString(endata, keydata) { var data = endata;// 要加密的字符串 var key1 = keydata; var key2 = keydata; var key3 = keydata; var enchex = strEnc(data, key1, key2, key3);// 加密 return enchex; } 调用 debugger var x = enString("6", "AAA"); alert(x)