100-project-100-days-website/100_projects/77-control-brightness/main.js
2023-05-09 17:41:12 +03:00
Ask

6 lines
234 B
JavaScript

{a6fedaf590fb53f4264b3342ced10bec061b08f3 true 234 main.js 0xc001f5a5b0}

rangeInput = document.getElementById('range');
container = document.getElementsByClassName('container')[0];
rangeInput.addEventListener("change",function(){
container.style.filter = "brightness(" + rangeInput.value + "%)";
});