| 1 | <!-- https://www.petercollingridge.co.uk/tutorials/svg/interactive/button/ --> |
| 2 | <svg viewBox="0 0 50 22" |
| 3 | xmlns="http://www.w3.org/2000/svg" |
| 4 | height="2em"> |
| 5 | <script type="text/javascript"><![CDATA[ |
| 6 | function buttonClick(evt) { |
| 7 | alert('Click'); |
| 8 | } |
| 9 | ]]></script> |
| 10 | <g onmouseup="buttonClick(evt)"> |
| 11 | <rect x="0" y="0" rx="5" ry="5" width="50" height="22" |
| 12 | style="fill: #85ffdb; cursor: pointer;" /> |
| 13 | <text x="5" y="16" font-size="12px">Button</text> |
| 14 | </g> |
| 15 | </svg> |