由於你的程式沒有編排過,所以我就不看囉。 轉 16 進位可以用 .toString(16) 所以字元轉ASCII再轉16進位可以試試看這樣: alert('a'.charCodeAt(0).toString(16));
www.jsgears.com