We can use the js split
function, and it's length minus 1 will be the number of occurrences.
var temp = "This is a string.";alert(temp.split('is').length-1);
We can use the js split
function, and it's length minus 1 will be the number of occurrences.
var temp = "This is a string.";alert(temp.split('is').length-1);