Edit in JSFiddle

<P>Array : ["Mycar", "Volvo", "BMW"]</P>
<input type="text" id="inputVal" value="">
<button id="check">Check value exist or not</button>
$("#check").click(function(){
var arr = ["Mycar", "Volvo", "BMW"];
var inputVal = $("#inputVal").val();
if(jQuery.inArray(inputVal,arr )<0)
{
alert('Value not found');
} 
else
{
alert('Value found');
}
});