当前位置:网站首页>Gets the number of occurrences of a character in a string

Gets the number of occurrences of a character in a string

2022-06-12 08:40:00 Pumpkin_ xiaoXuan

var s = 'www.jb51.net';
var n = (s.split('.')).length-1;
alert(n); // eject 2

原网站

版权声明
本文为[Pumpkin_ xiaoXuan]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/03/202203010547586301.html