button[type="submit"] { height: 30px; font-size: 18px; background-color: #4CAF50; color: white; border: none; cursor: pointer; }
.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); }); Searching for- gooner in-All CategoriesMovies O...
<script src="script.js"></script> </body> </html> body { font-family: Arial, sans-serif; margin: 0; padding: 0; } button[type="submit"] { height: 30px
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"}, ]; } .result h2 { margin-top: 0
displayResults(results); }
.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; }