JSFiddle - React, Tailwind, and code Playground

HTML

<input name="txtAddress" type="text" value="google is better" maxlength="100" id="txtAddress">

JavaScript

var vals = new Array('stackoverflow', 'google', 'yahoo');
var val = $('#txtAddress').val();
$.each(vals, function(i, a) {
  if (val.indexOf(a) > -1) {
    alert("found in " + a);
  }

});