String Manipulation

To change the Case of variable strings

var thistext = alltext.value;
thistext = thistext.toUpperCase()
thattext = thattext.toLowerCase()

toString()

toString() creates a string from elements of an array separated by commas.

contact = new Array("Peter","George","Matt");
alert(contact.toString()); //would return Peter,George,Matt

Substring methods

var substring_name = string_name.substr(start_position, substring_length);
var substring_name = string_name.substring(start_position, end_position);

Home
Site Index