Jump to content

M4rtin1

Members
  • Posts

    1
  • Joined

  • Last visited

Everything posted by M4rtin1

  1. Hallo, I want to make a todo list website for practicing, do you know why the JSON.stringify argument doesn't work in the script? The alert says: "eingabe = {}" no matter what I put in the input box. Thanks! document.getElementById("addto").addEventListener("click", addtolist); function addtolist() { var eingabe = document.getElementById('meininput'); var liste = document.getElementById("liste").textContent; alert("eingabe = " + typeof eingabe + " liste = "+ typeof liste + " eingabe = " + eingabe.value + " liste = "+ liste); var eingabestring = JSON.stringify(eingabe); alert("eingabe = " + typeof eingabestring + " liste = "+ typeof liste + " eingabe = " + eingabestring + " liste = "+ liste); eingabestring.write('<br/>'); eingabestring.write(liste); document.getElementById("liste").textContent = eingabe.nodeValue; }
×
×
  • Create New...