Skip to content

Instantly share code, notes, and snippets.

Last active August 3, 2020 08:37
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
What would you like to do?
<title>AJAX-Beispiel 1</title>
function laden() {
let ajaxObj = new XMLHttpRequest();
ajaxObj.onreadystatechange = ausgeben;"GET", "daten.txt", true);
function ausgeben(){
if (this.readyState == 4 && this.status == 200) {
document.getElementById("ausgabe").innerHTML = this.responseText;
<h1>Nachrichten anzeigen</h1>
<textarea id="ausgabe" style = "height:150px; width:150px;">
<button type="button" onclick="laden()">Inhalt anzeigen</button>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment