tidy up, ajax test
This commit is contained in:
19
test/ajax.html
Normal file
19
test/ajax.html
Normal file
@ -0,0 +1,19 @@
|
||||
<!DOCTYPE html>
|
||||
<head>
|
||||
<title>Ajax test</title>
|
||||
</head>
|
||||
<body>
|
||||
<h1>README</h1>
|
||||
<h2>loaded in the "Ajax" style</h2>
|
||||
<pre id="readme"></pre>
|
||||
<script>
|
||||
var $ = document.querySelector.bind(document);
|
||||
var req = new XMLHttpRequest();
|
||||
req.open("get", "../README.md", true);
|
||||
// req.open("get", "http://localhost:8010/README.md", true);
|
||||
req.onload = function(){
|
||||
$("#readme").textContent = this.responseText;
|
||||
}
|
||||
req.send()
|
||||
</script>
|
||||
</body>
|
Reference in New Issue
Block a user