02 May 2014

How To Get The Clicked Element of The HTML Body

<html>
    <head>
<script>
  function getClickedElement(e){
  var clickedElement=e.target; // target property of the event gives the clicked element.
}
           </script>
       </head>
      <body onclick=”getClickedElement(event)”>
      </body>
</html>
Post a Comment