JSFiddle - React, Tailwind, and code Playground
Get Total count of keyword tertentu
by Shah Danial
HTML
<textarea>malayatimes.com hahaha www.malayatimes.com</textarea>
<br><br>
<button>
TEST
</button>
JavaScript
// Get Total count of keyword tertentu
$('button').click(function(){
var selector = $('textarea').val();
var jumlah = selector.split("malayatimes.com").length - 1;
alert(jumlah);
});