dynamic text test

master
louisa 1 year ago
parent 3441e60b42
commit 6fe1c97326

@ -19,6 +19,8 @@
// Split the data into separate parts
const [node, value] = data.split(' ');
document.getElementById('log-text').textContent = 'user ${value} entered zone ${node}';
if (node === 'node3' && value === '15') {
// Change the background color to red
document.body.style.backgroundColor = 'red';
@ -75,7 +77,7 @@
<div class="section" id="location-log">
<p>user 15 entered zone 4</p>
<p id="log-text"></p>
</div>
<div class="section" id="nav-console">

Loading…
Cancel
Save