next up previous contents
Next: indexOf Up: Methods Previous: concat   Contents


fromCharCode

Description
Combines the value of the String object with the parameters and returns the newly formed string; the original value of the String object is unchanged.


Syntax

  1. StringObj.fromCharCode(c_1, c_2, ..., c_n)
  2. "String Literal".fromCharCode(c_1, c_2, ..., c_n)


Parameters

c_1, c_2, ..., c_n
Decimal integers that represent ASCII values.


Returns

returns a string made up of the characters represented by the ASCII values in the parameters


Example

A String object need not be created before calling fromCharCode. This example uses the fromCharCode method to insert an "" character in the e-mail address.

address = "support" + String.fromCharCode(64) +
    "swfkit.com";
trace(address);
//output: support@swfkit.com




Copyright ©2000-2010 Shanghai TopCMM Software Technologies. All Rights Reserved.