test.svg 401 B

1234567891011121314
  1. <svg width="100%" height="100%" viewBox="0 0 100 100" xmlns="http://www.w3.org/2000/svg">
  2. <script type="text/javascript">
  3. // <![CDATA[
  4. function change(evt) {
  5. var target = evt.target;
  6. var radius = target.getAttribute("r");
  7. radius = (radius == 15) ? 45 : 15
  8. target.setAttribute("r", radius);
  9. }
  10. // ]]>
  11. </script>
  12. <circle cx="50" cy="50" r="45" fill="green" onclick="change(evt)" />
  13. </svg>