'target' Example : target event « Javascript Properties « JavaScript Reference

Home
JavaScript Reference
1.Event Handlers Reference
2.Javascript Collections
3.Javascript Methods
4.Javascript Objects
5.Javascript Properties
JavaScript Reference » Javascript Properties » target event 
'target' Example

    
<html>
<body>
<script>
function function1(myEvent) { 
   document.getElementById("myX").innerHTML = myEvent.layerX;
   document.getElementById("myY").innerHTML = myEvent.layerY; 

document.onmousemove = function1;
</script>
<p>
<b>Layer X:</b> 
<span id="myX">0</span>
</p>
<p>
<b>Layer Y:</b> 
<span id="myY">0</span>
</p>
<button onclick="alert(event.type);">Event Type</button>
</body>
</html>

    
      
      
Related examples in the same category
1.'target' Syntax and Note
2.'target' is applied to
java2s.com  | Contact Us | Privacy Policy
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.