+ 7
I think the error is because you are using width as function name. Try using something else like width1 or width2. It's working perfectly.
21st Feb 2019, 11:59 PM
Arushi Singhania
Arushi Singhania - avatar
+ 4
The problem is: element.width.value = value; Instead you need: element.style.width = value; function widthChange() { var widthValue = slide.value; slideValue.innerHTML = widthValue; document.getElementById("rectShape").style.width = slide.value; } onload = ()=> { widthChange(); }
22nd Feb 2019, 1:11 AM
Boris Batinkov
Boris Batinkov - avatar