title: How to access a javascript in HTML5 from another Javascript
body: <p>I want to know whether I can access variables in one  in a separate  in the same HTML file. The below code is to give an example of what I am trying to do. It doesn't work at all though but it should help to see what I want to do</p>
  
  <pre><code>&lt;script type="text/javascript" id="script1"&gt;
      otherScript = document.getElementById("script2")
      number1=otherScript.someNumber
  &lt;/script&gt;
  
  
  &lt;script type="text/javascript" id="script2"&gt;
      someNumber=7
  &lt;/script&gt;
  </code></pre>