+ 1
JS Type error
What’s wrong here? It says the function isn’t real or something. https://code.sololearn.com/W0e6s1IPS8ED/?ref=app
2 Respostas
+ 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.
+ 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();
}