title: Passing argument to JS function from link onclick
body: <p>I have a link that looks like this:</p>
  
  <pre><code>&lt;a id="mylink" onclick="deleteHike( 3 );" href="javascript:void(0);"&gt;Yes&lt;/a&gt;
  </code></pre>
  
  <p>It is able to call this JavaScript:</p>
  
  <pre><code>window.onload = function()
  {
  
    //Get a reference to the link on the page
    // with an id of "mylink"
    var a = document.getElementById("mylink");
  
    //Set code to run when the link is clicked
    // by assigning a function to "onclick"
    a.onclick = function( hike_id )
    {
       // Somecode her
       // But when I try to use the hike_id it displays as [object MouseEvent] 
    }
  }
  </code></pre>
  
  <p>But the value that comes in is [object MouseEvent], not the number that I was expecting.  Any idea why this happens and how to fix this? :)</p>
  
  <p>Thanks!</p>