2024-03-24 14:37:28 +07:00
|
|
|
<!DOCTYPE html>
|
|
|
|
|
<html>
|
|
|
|
|
<head>
|
|
|
|
|
<title>Page Title</title>
|
|
|
|
|
</head>
|
2024-03-27 15:52:58 +07:00
|
|
|
|
|
|
|
|
<body>
|
|
|
|
|
<div id="begin"> begin </div>
|
|
|
|
|
</body>
|
|
|
|
|
|
2024-03-24 14:37:28 +07:00
|
|
|
<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;
|
|
|
|
|
}
|
|
|
|
|
|
2024-03-27 15:52:58 +07:00
|
|
|
|
|
|
|
|
function RereshAll(){
|
|
|
|
|
var str_out = readFile("?machine");
|
|
|
|
|
console.log("Test readFile " + str_out)
|
|
|
|
|
document.getElementById("begin").innerHTML = str_out;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
setInterval( RereshAll, 1000);
|
2024-03-24 14:37:28 +07:00
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</html>
|