we can use function fnStrInStr(myStrVal,srchStr) {if(fnStrInStr.indexOf(srchStr)>0) {alert('String found');} else{alert('String Not found');} }
use searchstring.lastIndexOf('string to be search') > -1