4 <title>Interactive SVG with Javascript</title>
5 <script type="text/javascript" id="ohgodnowhatamIdoing">
9 setTimeout(function () {
10 var colour = (count % 2 == 0) ? "#000000" : "#00ff00";
11 document.getElementById("rect1").style.fill = colour;
18 <svg id="svg_example" xmlns="http://www.w3.org/2000/svg"
19 version="1.1" width="104" height="186">
20 <path id="straightline" d = "m 0, 0 104, 186" style="stroke:#000000;"/>
22 x = "30" y = "20" width = "30" height = "150"
23 style = "fill:#0000ff; fill-opacity:0.5; stroke:#000000;"/>
25 d = "m 57,185 c 0,0 57,-13 32,-43 -25,-30 -53,2 -25,-30 28,
26 -32 52,17 28,-32 -24,-50 -16,44 -35,12 -19,-32 13,-64 13,
27 -64 0,0 40,-50 -0,-14 -40,36 -94,68 -59,109 35,41 45,62 45,62 z"
28 style = "fill:#ff0000; fill-opacity:0.75; stroke:#000000;"/>
30 x = "12" y = "130" width = "60" height = "20"
31 style = "fill:#00ff00; fill-opacity:0.5; stroke:#000000;"/>
33 <img src="shape.svg"/>
35 <button id="ohdearabutton" onclick="interact();">Asplode</button>