Javascript中char和int的互相转换的代码
// Converts an integer (unicode value) to a char
function itoa(i)
{
return String.fromCharCode(i);
}
// Converts a char into to an integer (unicode value)
function atoi(a)
{
return a.charCodeAt();
}
function itoa(i)
{
return String.fromCharCode(i);
}
// Converts a char into to an integer (unicode value)
function atoi(a)
{
return a.charCodeAt();
}