I want change height or width when a click in a button. I try this but not work:
function modify(){
document.getElementById('cercle1').style.height = "10px";
document.getElementById('cercle1').style.width = "10px";
}
I want change height or width when a click in a button. I try this but not work:
function modify(){
document.getElementById('cercle1').style.height = "10px";
document.getElementById('cercle1').style.width = "10px";
}
In SVG width and height of <rect>
elements are attributes and not CSS properties so you'd need to write
document.getElementById('cercle1').setAttribute("height", "10px");
similarly for the width.