Javascript-форум (https://javascript.ru/forum/)
-   Общие вопросы Javascript (https://javascript.ru/forum/misc/)
-   -   подскажите как сделать форму поиска (https://javascript.ru/forum/misc/43727-podskazhite-kak-sdelat-formu-poiska.html)

maxim96 18.12.2013 00:02

подскажите как сделать форму поиска
 


как сделать ?! не могу с кнопками решить, как на скриншоте сделать...
единственное что смог нарисовать

Winzer 18.12.2013 09:59

Вот,держи.
<!DOCTYPE html>
<html >
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
	<script>
		window.onload = init;
		function init() {
			var button = document.getElementById("searchButton"); // Получаем id кнопки
			button.onclick = handleButton; // При нажатии на кнопку,посылаем обработку функции handleButton
		}
		function handleButton() {
			var textInp = document.getElementById("searchText"); // Получаем id текстового поля
			textInp.value = "";

		}
	</script>
</head>
<body>
	<form>
		<input type="text" id="searchText" size="40" placeholder="Поиск">
		<input type="button" id="searchButton" value="Очистить">
	</form>
</body>
</html>

Winzer 19.12.2013 00:47

Цитата:

Сообщение от Rise (Сообщение 287586)
Winzer, :D
<form>
    <input type="text" placeholder="Поиск">
    <input type="reset" value="Очистить">
</form>

Ну я думал ему на яве нужно.Фиг поймешь :)


Часовой пояс GMT +3, время: 16:39.