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.
My javascript/html so far:
<div class="curVariable">
Cur variable: <span id="curVar"></span>
</div>
<script type="text/javascript">
var curVar= 1;
document.getElementById("curVar").innerHTML = curVar;
</script>