Using html create a program that acts as a search engine, it lets you search for any book.
Answer ->
<!DOCTYPE html>
<html>
<head>
<script type="text/javascript"
src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<script tpye="text/javascript">
$(document).ready(function()
{
var url = document.location.href;
var search_val_raw = url.split("?q=")[1];
var search_val_count = search_val_raw.split("+");
var search_val;
for(var i = 0; i < search_val_count.length; i++)
{
search_val = search_val_count[i];
$("#search-results p:contains(" + search_val +
")").show();
}
});
</script>
<style type="text/css">
#search-results p
{
display: none;
}
</style>
</head>
<body>
<div id="search-results">
<p><a href="#">Lorem Ipsum</a></p>
<p><a href="#">Test</a></p>
<p><a href="#">Brofist</a></p>
</div>
<form action="search.html" method="GET">
<input type="text" name="q" placeholder="Search"/>
<input type="submit" value="Search"/>
</form>
</body>
</html>
Get Answers For Free
Most questions answered within 1 hours.