27 lines
536 B
HTML
27 lines
536 B
HTML
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<title>Page Title</title>
|
|
</head>
|
|
<script>
|
|
function readFile(filePath) {
|
|
var result = null;
|
|
var xmlhttp = new XMLHttpRequest();
|
|
xmlhttp.open("GET", filePath, false);
|
|
xmlhttp.send();
|
|
if (xmlhttp.status==200) {
|
|
result = xmlhttp.responseText;
|
|
}
|
|
xmlhttp.abort();
|
|
return result;
|
|
}
|
|
|
|
console.log("Test readFile " + readFile("?test-hurr"))
|
|
</script>
|
|
<body>
|
|
|
|
<h1>This is a Heading</h1>
|
|
<p>This is a paragraph.</p>
|
|
|
|
</body>
|
|
</html>
|