title: How pass parameter to a javascript onclick function.No jquery please
body: <p>I have created a button and onclick of it I want to pass the attribute values to a function</p>
  
  <pre><code>&lt;button type="button"  name="createTask" id="createTask" class="createButton" onclick="Components.init(this)" &gt;Add Task&lt;/button&gt;
  </code></pre>
  
  <p>I also have a javascript function located in an external js file</p>
  
  <pre><code>var Components = function(attributes){
  var attributed = attributes;
   var _init = function(){
      console.log("Method Executing:Compnents.init")
      alert(attributes.id)        
  
      }
  return {
      init:_init,
  
      }
  }()
  </code></pre>
  
  <p>But alerting this is showing undefined.How do I pass parameter to this javascript function.
      I have included this component.js which has this function at bottom of the html body</p>