init py server
This commit is contained in:
14
static/script.js
Normal file
14
static/script.js
Normal file
@@ -0,0 +1,14 @@
|
||||
document.getElementById('befehlForm').addEventListener('submit', function(event) {
|
||||
event.preventDefault(); // Seite nicht neu laden!
|
||||
|
||||
const befehl = document.getElementById('befehl').value;
|
||||
|
||||
fetch(`/send?befehl=${encodeURIComponent(befehl)}`)
|
||||
.then(response => response.text())
|
||||
.then(text => {
|
||||
document.getElementById('status').textContent = text;
|
||||
})
|
||||
.catch(err => {
|
||||
document.getElementById('status').textContent = 'Fehler beim Senden.';
|
||||
});
|
||||
});
|
||||
12
static/style.css
Normal file
12
static/style.css
Normal file
@@ -0,0 +1,12 @@
|
||||
body {
|
||||
font-family: sans-serif;
|
||||
padding: 2rem;
|
||||
background-color: #f4f4f4;
|
||||
}
|
||||
|
||||
form {
|
||||
background: #fff;
|
||||
padding: 1rem;
|
||||
border-radius: 8px;
|
||||
box-shadow: 0 0 10px rgba(0,0,0,0.1);
|
||||
}
|
||||
Reference in New Issue
Block a user