<html>
<head>
<meta http-equiv="Content-Type"
content="text/html; charset=ISO-8859-1">
<title>Insert title here</title>
<script src="jquery.js"></script>
</head>
<body>
<input type="text" id="text1">
<input type="button" id="btn">
<div id="article"></div>
</body>
<script>
$("#btn").click(
function f(){
$.ajax({
data: {
format: "json",
action: "parse",
page: $("#text1").val(),
prop:"text",
section:0,
},
dataType: 'jsonp',
headers: {
},
success: function (data) {
alert(data)
// console.log(data)
// $("#article").html(data.parse.text["*"])
var markup = data.parse.text["*"];
var
i = $('<div></div>').html(markup);
//
remove links as they will not work
i.find('a').each(function() {
$(this).replaceWith($(this).html()); });
//
remove any references
i.find('sup').remove();
//
remove cite error
i.find('.mw-ext-cite-error').remove();
$('#article').html($(i).find('p'));
}
})});
</script>
</html>
here is my code sir..
it fetch data from wiki but find only some keywords regarding
places not all keywords through out wikipedia