@@effel
eigentlich müßte es funktionieren,was ist daran falsch?
So ziemlich alles. Angefangen bei der Formatierung deines Postings. Was hat <img id="WWW"> im JavaScript-Code zu suchen? Und wenn du die Sprache des Codes angibst, wird er durch Syntax-Highlighting etwas lesbarer. So war dein Posting eine ziemliche Zumutung für die Leser.
Und deine Frage hat weder mit „design/layout“ noch mit „programmiertechnik“ im Allgemeinen zu tun. Richtig wäre das Tag „javascript“ gewesen.
Deinen Fehler im JavaScript haben MudGuard und Rolf ja schon genannt. Aber noch ein Pro-Tip: console.log() oder console.debug() sind zum Debuggen besser geeigner als alert().
🖖 Live long and prosper
--
“In my home, the America I love, the America I've written about, that has been a beacon of hope and liberty for 250 years, is currently in the hands of a corrupt, incompetent and treasonous administration. Tonight, we ask all who believe in democracy and the best of our American spirit, to rise with us, raise your voices against authoritarianism, and let freedom reign.”
— Bruce Springsteen, Manchester 2025-05-14
“In my home, the America I love, the America I've written about, that has been a beacon of hope and liberty for 250 years, is currently in the hands of a corrupt, incompetent and treasonous administration. Tonight, we ask all who believe in democracy and the best of our American spirit, to rise with us, raise your voices against authoritarianism, and let freedom reign.”
— Bruce Springsteen, Manchester 2025-05-14