You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

16 lines
610 B
HTML

1 month ago
<!doctype html>
<html>
<body>
<div id="result"></div>
<script>
let url = "https://en.wikipedia.org/w/api.php?action=compare&format=json&fromtitle=Han%20Kang&fromrev=376586279&totitle=Han%20Kang&torelative=next&formatversion=2&origin=*";
fetch(url).then(resp => resp.json()).then(data => {
console.log("data", data);
let result = document.querySelector("#result");
result.innerHTML = data.compare.body;
let toid = data.compare.toid;
});
</script>
</body>
</html>