Skip welcome & menu and move to editor
Welcome to JS Bin
Load cached copy from
 
<!DOCTYPE html>
<html>
<head>
<meta charset=utf-8 />
<title>DOM0 Checkbox Click Event Example</title>
  <style>
    body {
      font-family: sans-serif;
    }
  </style>
</head>
<body>
  <p>Note how <code>click</code> fires immediately, even on IE (and regardless of whether you click the label or the checkbox itself).</p>
  <!-- The 'for' and 'id' are only needed by IE6; modern browsers understand that if the input is _inside_ the label, the label is for the input -->
  <label for="cb"><input id="cb" type="checkbox" onclick="handleClick(this);">Checkbox</label>
</body>
</html>
Output 300px

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

Dismiss x
public
Bin info
anonymouspro
0viewers