Source

<svg xmlns="http://www.w3.org/2000/svg" width="400" height="200">
<script><![CDATA[
var n=0;
function clone_objet(evt)
{svgdoc=evt.target.ownerDocument;n=n+1;
objet=svgdoc.getElementById("rectangle");
var newnode = objet.cloneNode(false);
newnode.setAttribute ("x",100+10*n);newnode.setAttribute ("y",100+10*n);
newnode.style.setProperty("fill","blue","")
;
var contents = svgdoc.getElementById ('affiche');
newnode = contents.appendChild (newnode)}
]]></script>
<g id="affiche">
<rect id="rectangle" onclick="clone_objet(evt)" x="50" y="50" width="100" height="50" style="fill:green"/>
</g>
</svg>

 
Run with Adobe ASV3 ASV 6 beta Squiggle Firefox 1.5 Opera 9 beta