<script>
// Diashow automatisch
window.addEventListener("load", function () {
const xhr = new XMLHttpRequest();
xhr.open("GET", document.URL+"?show");
xhr.send(null);
xhr.onreadystatechange = function () {
if (xhr.readyState == 4 &&
xhr.status == 200) {
var obj = JSON.parse(xhr.responseText);
var i = 1;
document.getElementById("dummy").src = obj[0].names;
setInterval(function () {
if (i == obj.length) i = 0;
document.getElementById("dummy").src = obj[i].names;
i++;
}, 5000); // Geschwindigkeit - Angabe in Millisekunden
}
}
});
</script>
<style>
body {
font-family: Verdana, Arial, Sans-Serif;
}
h2 {
font-weight: Normal;
}
figure img#dummy {
max-width: 100%;
height: Auto;
display: Block;
margin: 1rem Auto 1rem Auto;
box-shadow: 1px 1px 5px #888888;
border: Solid 1px #000000;
}
</style>