@alisa.bahringer Вы можете получить значение input поля в Javascript через .value свойство, ниже пример кода:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
<html> <head> <meta charset="utf-8"/> </head> <body> <label for="search">Поиск:</label> <input name="search" type="text" id="search" value="текст"/> </body> <script> let searchElement = document.getElementById("search") // Вывод: текст console.log(searchElement.value); </script> </html> |