Home | Javascript validator | JavaScript Editor JavaScript EditorGet Advanced
JavaScript and Ajax Editor,
Validator and Debugger!

1st JavaScript Editor.
Microsoft® JScript®
split Method
 Language Reference 
Version 3 

See Also                  Applies To


Description
Returns the array of strings that results when a string is separated into substrings.
Syntax
stringObj.split(str)

The split method syntax has these parts:

Part Description
stringObj Required. The String object or literal to be split. This object is not modified by the split method.
str Required. A string or Regular Expression object describing what character is used to define where the splits take place.

Remarks
The result of the split method is an array of strings split at each point where str occurred in stingObj.

The following example illustrates the use of the split method:

function SplitDemo()
{
  var s, ss;
  var s = "The quick brown fox jumped over the lazy yellow dog.";
  // Split at each space character.
  ss = s.split(" ");
  return(ss);
}

Home | Javascript validator | JavaScript Editor JavaScript EditorGet Advanced
JavaScript and Ajax Editor,
Validator and Debugger!

1st JavaScript Editor.