title: How to call a javascript function from html button in chrome extension?
body: <p>I have a button in my chrome extension</p>
  
  <pre><code>&lt;input type="submit" value="Refresh Page" title="Submit" style="width: 210px; height: 60px;"/&gt; 
  </code></pre>
  
  <p>When I click it, I want it to call this function in a separate javascript file:</p>
  
  <pre><code>function click (0) {
      chrome.tabs.getSelected(null, function(tab) {
      var code = 'window.location.reload();';
      chrome.tabs.executeScript(tab.id, {code: code});
  });}
  </code></pre>
  
  <p>I don't know if the code goes in the html file or javascript file :/ I'm really new to javascript and the chrome api so some help would be really cool.</p>