Código HTML:
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<script language="javascript">
function buscaBlanco(cad)
{
if (cad.indexOf("blanc") != -1) alert("Si hay");
else alert("No hay");
}
</script>
</head>
<body>
<form name="form1" method="post" action="">
<p><input type="text" name="texto"></p>
<p><input name="" type="button" onClick="buscaBlanco(texto.value);" value="Hay blanco?"></p>
</form>
</body>
</html>