|
12345678910111213141516171819202122232425262728293031323334353637383940 |
- // var slider = document.getElementById("helligkeit");
- // var output = document.getElementById("l_pwm");
- // output.innerHTML = slider.value; // Display the default slider value
-
- // // Update the current slider value (each time you drag the slider handle)
- // slider.oninput = function() {
- // output.innerHTML = this.value;
- // }
-
-
-
- let xhr = new XMLHttpRequest();
-
- xhr.onreadystatechange = function(){
- if(xhr.readyState == 4) {
- if (xhr.status == 200){
- console.log(xhr.responseText);
- terminal = document.getElementById("term");
- autoscroll = document.getElementById("scroll");
- terminal.innerHTML += xhr.responseText;
- if(autoscroll.checked)
- terminal.scrollTop = terminal.scrollHeight;
- }
- else {
- console.log("status:", xhr.status);
- }
- }
- }
-
- function reloadTerminal() {
- xhr.open("POST", "/app=terminal", true);
- xhr.send();
- setTimeout(reloadTerminal, 1000);
- };
-
- reloadTerminal();
-
- function clearTerminal() {
- document.getElementById("term").innerHTML = '';
- }
|