Я не могу получить свой поиск, чтобы возвращать результаты, я пытаюсь получить строку поиска, чтобы взять ключевые слова, после отправки она должна искать ключевые слова во всех <div>
в мой сайт, а не одну страницу и отобразить совпадения на странице searchresults.html.Невозможно получить javascript/html searchbar для работы
<script type="text/javascript">
document.getElementById('button-submit').onsubmit = function() {
window.location = 'http://www.google.com/search?q=site:webflicks.co ' + document.getElementById('button-submit').value;
return false;
}
</script>
<div class="parent">
<div class = "search">
<form id="searchbox" method="get" action="/search" autocomplete="off">
<input name="q" type="text" size="15" placeholder="Enter keywords here..." />
<input id="button-submit" type="submit" value=""/> \t
</form>
</div>
</div>
</div>
[Атрибут заполнителя HTML5 не заменяет элемент метки] (http://www.456bereastreet.com/archive/201204/the_html5_placeholder_attribute_is_not_a_substitute_for_the_label_element/) – Quentin