How to use jquery contains for textbox,I have attached the fiddle link for your code reference,
<div id="txtCon">
<input type="text" name="man-news" />
<input type="text" name="milkman" />
<input type="text" name="letterman2" />
<input type="text" name="newmilk" />
has
</div>
Script:
$('input[name*="new"]').val('has');
$('input:text:contains("has")').css("color","red");
Link:
have a look there! – MISJHA May 02 '13 at 04:14