Wikipedia Search

Developer
Size
1,867 Kb
Views
8,096

How do I make an wikipedia search?

What is a wikipedia search? How do you make a wikipedia search? This script and codes were developed by Jerry Byron on 11 December 2022, Sunday.

Wikipedia Search Previews

Wikipedia Search - Script Codes HTML Codes

<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>Wikipedia Search</title> <link rel='stylesheet prefetch' href='https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/4.0.0-beta/css/bootstrap.min.css'> <link rel="stylesheet" href="css/style.css">
</head>
<body> <div class="container"> <h1>Wikipedia Search</h1> <input id="searchTerm" name="search" placeholder="search..."/> <button id="search">Submit</button> <div id="output"></div>
</div> <script src='https://cdnjs.cloudflare.com/ajax/libs/jquery/3.2.1/jquery.min.js'></script> <script src="js/index.js"></script>
</body>
</html>

Wikipedia Search - Script Codes JS Codes

$("#search").on("click", function(){ var searchTerm = $("#searchTerm").val(); var url = "https://en.wikipedia.org/w/api.php?action=opensearch&search="+ searchTerm +"&format=json&callback=?"; $.ajax({ url: url, type: "GET", async: false, dataType: json, success: function(data, status, jqXHR){ console.log(data); for( var i = 0; i < data[1].lenght; i++) { $("#output").prepend(<div><div class='well'><a href ="+ data[3][i]+"><h2>" + data[1][i] + "</h2>" + "<p>" + data[2][i] + "</p></a></div></div>); } } })
})
Wikipedia Search - Script Codes
Wikipedia Search - Script Codes
Home Page Home
Developer Jerry Byron
Username tomcolby
Uploaded December 11, 2022
Rating 3
Size 1,867 Kb
Views 8,096
Do you need developer help for Wikipedia Search?

Find the perfect freelance services for your business! Fiverr's mission is to change how the world works together. Fiverr connects businesses with freelancers offering digital services in 500+ categories. Find Developer!

Jerry Byron (tomcolby) Script Codes
Create amazing SEO content with AI!

Jasper is the AI Content Generator that helps you and your team break through creative blocks to create amazing, original content 10X faster. Discover all the ways the Jasper AI Content Platform can help streamline your creative workflows. Start For Free!