Last active
September 15, 2015 04:17
-
-
Save KitaitiMakoto/7dfb8f52da7d4e5fe8ca to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!doctype html> | |
<style> | |
.keyword { | |
font-weight: bold; | |
color: red; | |
} | |
</style> | |
<h1></h1> | |
<div></div> | |
<script> | |
var req = new XMLHttpRequest(); | |
req.responseType = "json"; | |
req.onload = function() { | |
var data = this.response; | |
console.dir(data); | |
document.querySelector("h1").textContent = "Title: " + data[1][0][2][0]; | |
document.querySelector("div").innerHTML = data[1][0][2][1]; | |
} | |
req.open("get", "http://epub-searcher-demo.kitaitimakoto.net/d/select?table=Books&query=CSS&match_columns=author,title,main_text&output_columns=title,snippet_html(main_text)"); | |
req.send(); | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment