There may be other ways of doing this, but you could consider using the
XMLHttpRequest object as in the example below.
xmlhttp=new XMLHttpRequest();
xmlhttp.open("GET","temperaure.txt",false);
xmlhttp.send();
document.getElementById("temperature").innerHTML=xmlhttp.responseText;