| ZVON > References > Zvon Example Repository |
| Intro / Search / ZVON |
| Example repository: index | categories | search |
| File: | script-eventDom-BE-01 |
| Author: | Vincent Hardy |
| Origin: | W3C SVG conformance suite |
![]() | SVG source |
![]() | SVG source |
![]() | SVG source |
| Elements | Attributes |
|---|---|
| a | xlink:href | |
| desc | id | |
| g | id | onclick | style | |
| line | style | x1 | x2 | y1 | y2 | |
| path | d | style | |
| rect | height | id | style | width | x | y | |
| script | type | |
| svg | height | id | width | |
| text | style | x | y | |
| title | id | |
function onMouseClick(evt) {
// Get Document
var target = evt.getTarget();
var doc = target.getOwnerDocument();
// Make test result visible
var testPassed = doc.getElementById('testPassed');
testPassed.setAttribute('style', 'visibility:visible');
// Make target invisible
var target = doc.getElementById('target');
target.setAttribute('style', 'visibility:hidden');
}
</script>