Home | Javascript validator | JavaScript Editor | Get Advanced JavaScript and Ajax Editor, Validator and Debugger! 1st JavaScript Editor. |
Microsoft® JScript® charCodeAt Method |
Language Reference Version 3 |
Returns the Unicode encoding of the specified character.
stringObj.charCodeAt(index)
The charCodeAt method syntax has these parts:
Part Description stringObj Required. A String object or literal. index Required. The zero-based index of the specified character.
If there is no character at the specified index, NaN is returned.The following example illustrates the use of the charCodeAt method:
function charCodeAtTest(n) { var str = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"; var s; s = str.charCodeAt(n - 1); // Return Unicode character code. return(s); }
Home | Javascript validator | JavaScript Editor | Get Advanced JavaScript and Ajax Editor, Validator and Debugger! 1st JavaScript Editor. |