sergeo_89,
<!DOCTYPE HTML>
<html>
<head>
<title>Untitled</title>
<meta charset="utf-8">
<style type="text/css">
.searchResult{
background: Aqua
}
</style>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script>
<script>
$(function(){
$('#search').submit(function(){
var searchValue = $('#textSearch').val();
if(searchValue == '' || searchValue == 'Поиск..') {
alert('Вы не заполнили поле ввода');
}
else {
globalSearch(searchValue);
}
return false;
})
function globalSearch(myString){
var regV = /\w\s\d[A-Za-z0-9-]+/g;
var result = myString.search(regV);
var allElements = $('*:not(".block_C, .block_C *")');
allElements.each(function(){
if($(this).text() == myString && result == -1) {
$(this).css('background','#F9FF82');
$('.block_C').prepend('<p>Результаты поиска:<br><br><span>' + myString + '</span><br><br></p>').addClass('searchResult');
}
else{
// globalSearchRemove(myString);
}
})
}
function globalSearchRemove(myResults){
$('.block_C p').fadeOut(300);
}
})
</script>
</head>
<body>
<p>test</p><p>notest</p>
<div class="block_C"></div>
<form id="search" method="POST" action="" name="searchform">
<input id="ButtonSearch" type="submit" value="Найти">
<input id="textSearch" type="text" name="search" value="Поиск..">
</form>
</body>
</html>