Skip welcome & menu and move to editor
Welcome to JS Bin
Load cached copy from
 
<!DOCTYPE html>
<html>
<head>
<script src="http://cdnjs.cloudflare.com/ajax/libs/processing.js/1.4.1/processing-api.min.js"></script>
<meta charset=utf-8 />
<title>JS Bin</title>
<!--[if IE]>
  <script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
<style>
  article, aside, figure, footer, header, hgroup, 
  menu, nav, section { display: block; }
</style>
  <script type="text/javascript">
    function affiche(element, num) {
      alert(element.parentNode.className);
    }
  </script>
</head>
<body>
  <ul>
    <li class="toto"><a href="javascript:void(0)" onclick="affiche(this, 1);">Affiche 1</a></li>
    <li class="tutu"><a href="javascript:void(0)" onclick="affiche(this, 2);">Affiche 2</a></li>
    <li class="titi"><a href="javascript:void(0)" onclick="affiche(this, 3);">Affiche 3</a></li>
  </ul>
</body>
</html>
Output

You can jump to the latest bin by adding /latest to your URL

Dismiss x
public
Bin info
anonymouspro
0viewers