Source

<svg xmlns="http://www.w3.org/2000/svg" width="400" height="200">
<script><![CDATA[
function change_attribut(evt)
{svgdoc=evt.target.ownerDocument;
objet=svgdoc.getElementById("rectangle");
objet.setAttribute("width","200");objet.setAttribute("height","80");
objet.style.setProperty("fill","red","")}
]]></script>
<g id="affiche">
<rect id="rectangle" onclick="change_attribut(evt)" x="50" y="100" width="100" height="50" style="fill:green"/>
</g>
</svg>
Run with Adobe ASV3 ASV 6 beta Squiggle Firefox 1.5 Opera 9 beta