164
rated 0 times
[
167]
[
3]
/ answers: 1 / hits: 85028
/ 13 Years ago, fri, november 25, 2011, 12:00:00
How can I remove the first three letters of a string in JQuery?
For example: Turn cat1234
to 1234
More From » jquery
How can I remove the first three letters of a string in JQuery?
For example: Turn cat1234
to 1234
No jQuery needed.
cat1234.slice(3);
or
cat1234.substring(3);
or
cat1234.substr(3);
var str=cat1234;
console.log(using slice =,str.slice(3));
console.log(using substring =,str.substring(3));
console.log(using substr =,str.substr(3));