Ajax is not updating text (.txt)

1

I made the ajax connection (I copied and pasted it myself) to insert a text in .txt into the div so I changed the text and saved it, but it still shows the text before the modification

<script>
    function corpo(titulo, texto) {
      var xhttp = new XMLHttpRequest();
      xhttp.onreadystatechange = function() {
        if (this.readyState == 4 && this.status == 200) {
            document.getElementById("titulo").innerHTML = titulo;
            document.getElementById("corpo").innerHTML =
            this.responseText;
        }
      };
      xhttp.open("GET", texto, true);
      xhttp.send();
    }
</script>
    
asked by anonymous 14.11.2018 / 15:42

0 answers