1.toLowerCase (); Converts the letters in a string to uppercase.
For example:
var str = "AbcD";
Str=str.tolowercase ();
The result is: ABCD
2.toUpperCase (); Converts the letters in a string to lowercase.
For example:
var str = "AbcD";
Str=str.touppercase ();
The result is: ABCD
3.substr (); Starts with the specified string, intercepts the specified number of characters, and returns a new string.
For example:
var v = "really rich";
var a = V.substr (UP);
The result is: a very
4.concat (); Inserts the specified string at the beginning of another string, returning a new string.
For example:
var v1 = "large";
var v2 = "Home good";
var v3 = V1.concat (v2);
The result: Hello, everyone.
5.indexof (); Returns the index of the first occurrence of a string, in another string, and returns the index if it does not-1;
For example:
var v = "Profound is the issuance of loans";
var a = V.indexof (of);
The result is: 2
6.lastindexof (); similar to indexof, but returns the last occurrence of the index.
For example:
var v = "Profound is the issuance of loans";
var a = V.lastindexof (of);
The result is: 7
7.replace (); In a string, search for content that matches another string and replace it.
var v = "Hello everyone, my name is XX";
var a = V.replace ("XX", "Zhang San");
The result is: Hello, my name Zhang San.
JavaScript string Method (Common)