+ 1
why can't i change the width of the rect in svg? html and javascript
why can't i change the width of the rect in svg? i wrote these lines of code: in js file: window.onload=function() { var bone = document. getElementById("building"); bone. width="50"; } ; in html: i defined the script of java <rect id="building" width="100" height="150" x="0" y="150" /> the html code works it just doesn't change the width..
2 Answers
+ 1
how can i use the dom with the svg, what should i do?!
0
dom doesn't have width property