Searching For- Gooner In-all Categoriesmovies O... Guide

.result { margin: 20px; padding: 20px; border: 1px solid #ddd; border-radius: 5px; box-shadow: 0 0 10px rgba(0,0,0,0.1); width: 200px; }

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"}, ];

#searchResults { display: flex; flex-wrap: wrap; justify-content: center; } Searching for- gooner in-All CategoriesMovies O...

#searchForm { display: flex; justify-content: center; align-items: center; margin-top: 10px; }

button[type="submit"]:hover { background-color: #45a049; } .result { margin: 20px

<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Search for Movies</title> <link rel="stylesheet" href="style.css"> </head> <body> <header> <h1>Movie Search</h1> <form id="searchForm"> <input type="text" id="searchInput" placeholder="Searching for..."> <select id="categorySelect"> <option value="all">All Categories</option> <option value="movies">Movies</option> <!-- Add more categories here if needed --> </select> <button type="submit">Search</button> </form> </header> <main> <div id="searchResults"></div> </main>

.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); }); border: 1px solid #ddd

header { background-color: #333; color: white; padding: 20px; text-align: center; }

function displayResults(results) { const resultsDiv = document.getElementById('searchResults'); resultsDiv.innerHTML = ''; // Clear previous results