Handle click event on <LI> - Javascript DOM HTML Element

Javascript examples for DOM HTML Element:Li

Description

Handle click event on <LI>

Demo Code

ResultView the demo in separate window

<html>
   <head> 
      <meta name="viewport" content="width=device-width, initial-scale=1"> 
      <script type="text/javascript">
    window.onload=function(){/*from  www. jav  a  2  s .com*/
clickCircle=function(element)
{
console.log(element)
console.log(element.tagName)
}
    }

      </script> 
   </head> 
   <body> 
      <li class="circle" onclick="clickCircle(this)"></li>  
   </body>
</html>

Related Tutorials