Erste Versuche
This commit is contained in:
commit
b7586bed26
8 changed files with 253 additions and 0 deletions
4
static/main.css
Normal file
4
static/main.css
Normal file
|
@ -0,0 +1,4 @@
|
|||
body {
|
||||
background: black;
|
||||
color: white;
|
||||
}
|
11
static/main.js
Normal file
11
static/main.js
Normal file
|
@ -0,0 +1,11 @@
|
|||
function setstate(state) {
|
||||
var request = new XMLHttpRequest();
|
||||
request.onreadystatechange = function() {
|
||||
if (this.readyState == 4 && this.status == 200) {
|
||||
// process state here
|
||||
console.log("state changed to " + state);
|
||||
}
|
||||
};
|
||||
request.open("GET", "/api/state/" + state, true);
|
||||
request.send();
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue