Searching For- Gooner In-all Categoriesmovies O... Today
.result h2 { margin-top: 0; } document.getElementById('searchForm').addEventListener('submit', function(e) { e.preventDefault(); const searchTerm = document.getElementById('searchInput').value; const category = document.getElementById('categorySelect').value; searchContent(searchTerm, category); });
function searchContent(searchTerm, category) { // For demonstration, assume we have a function to fetch data from a backend or API // Here, we'll simulate the search results const results = [ {title: "Movie 1", description: "This is movie 1 about gooner"}, {title: "Movie 2", description: "This is movie 2 related to gooner"}, ]; Searching for- gooner in-All CategoriesMovies O...
#searchResults { display: flex; flex-wrap: wrap; justify-content: center; } .result h2 { margin-top: 0
#searchForm { display: flex; justify-content: center; align-items: center; margin-top: 10px; } function(e) { e.preventDefault()
<script src="script.js"></script> </body> </html> body { font-family: Arial, sans-serif; margin: 0; padding: 0; }
#categorySelect { height: 30px; font-size: 18px; margin: 0 10px; }