Hi,
if (document.getElementById('box').style.display = (chk.checked))
Das ist eine Zuweisung, kein Vergleich.
Und auch als Vergleich ergibt es wenig Sinn - welche Werte kann die display-Eigenschaft annehmen, und welche die checked-Eigenschaft einer Checkbox?
MfG ChrisB
--
The most exciting phrase to hear in science, the one that heralds new discoveries, is not “Eureka!” but “That's funny...” [Isaac Asimov]
The most exciting phrase to hear in science, the one that heralds new discoveries, is not “Eureka!” but “That's funny...” [Isaac Asimov]