function fcs(str) {
var len = str.length;
var tmp = "";
for(var i = 0;i<len;i++){
tmp = tmp ^ str[i].charCodeAt();
}
var tmps = tmp.toString(16);
if (tmps.Length == 1)
{
tmps = "0" + tmps;
}
return tmps;
}
var test = fcs("@00RD01000007");
//50
console.log(test);
本作品採用《CC 協議》,轉載必須註明作者和本文連結