blob: bb37603179ab642e1dfa6f8c47bb69268a9b6477 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
|
<h2>Lights Control</h2>
<ul>
<li><button onclick="setPercentage(0)">0%</button></li>
<li><button onclick="setPercentage(10)">10%</button></li>
<li><button onclick="setPercentage(20)">20%</button></li>
</ul>
<div id="percentageDisplay">Percentage: 0%</div>
<script>
function setPercentage(percentage) {
document.getElementById('percentageDisplay').innerText = `Percentage: ${percentage}%`;
}
</script>
|