title: Get value from a text file using javascript
body: <p>I have a text file which has one value in it, this value is updated over time but that doesn't matter, the thing is I want to get this value from the .txt file using javascript and then when I have gotten this value, I would like to change my current variable value to that new value from the .txt file. Because there is only one value at a time like 1 or 10, it just needs to get the value in the .txt file and not a specific value.</p>
  
  <p>My javascript/html so far:</p>
  
  <pre><code>&lt;div class="curVariable"&gt;
  Cur variable: &lt;span id="curVar"&gt;&lt;/span&gt;
  &lt;/div&gt;
  
  &lt;script type="text/javascript"&gt; 
  
  var curVar= 1;
  document.getElementById("curVar").innerHTML = curVar;
  
  &lt;/script&gt;
  </code></pre>