0
I have an SVG element and I want its height and width to fit according to the resolution. For this I will get in javascript through screen.width. Now I wanted to insert this obtained value into the svg tag. It is possible to do this?
<script>
var window_width = screen.width;
var window_height = screen.height;
</script>
<svg width="<script type='text/javascript'>screen.width</script>" height="500">
http://stackoverflow.com/questions/10973339/modifying-svg-attributes-with-javascript-has-no-effect
– Daniel Omine