摘要:
<!doctype html> <html lang="en"> <head> <meta charset="utf-8"> <meta http-equiv="x-ua-compatible" content="ie=edge"> <meta name="viewport" content="wi 阅读全文
posted @ 2023-05-26 14:58
芬-mi
阅读(26)
评论(0)
推荐(0)
摘要:
方法一:利用正则的match方法 var str="heleleoworled"; var count=(str.match(/le/g)||[]).length; console.log(count); 方法二:先把要找的字符替换为空,然后用前一个字符串的长度减去后一个字符串的长度,除以要查找的字 阅读全文
posted @ 2023-05-26 14:16
芬-mi
阅读(549)
评论(0)
推荐(0)

浙公网安备 33010602011771号