title: Why doesn't my javascript onclick work with div?
body: <p>I am trying to turn a <code>&lt;div&gt;</code> into a link to local HTML document (./lilo/index.html) using JavaScript.</p>
  
  <h3>HTML</h3>
  
  <pre><code>&lt;div class="pagelist_item" onClick="goto("./lilo")"&gt;
      &lt;h4&gt;Test Button&lt;/h4&gt;
      &lt;h6&gt;Discription&lt;/h6&gt;
  &lt;/div&gt;
  </code></pre>
  
  <h3>JavaScript</h3>
  
  <pre><code>function goto(url){
      window.location = url;
      alert(url);
  }
  </code></pre>
  
  <p>See <a href="http://jsfiddle.net/6HHTd/" rel="nofollow" title="Code Link">http://jsfiddle.net/6HHTd/</a></p>
  
  <p>But when I click the button, nothing happens.</p>
  
  <p>Why does this not work?</p>