Re: Change class problem
Joost Diepenmaat wrote:
>> document.getElementById("one").parentNode.classNam e = "onetype";
>
> ^^^ this changes the class of the <tr>, not the class of the <td> that
> you clicked on, and that's selected by the css above.
>
>> document.getElementById("one").innerHTML="Works?";
>
> that will just delete the <td> alltogether. Try taking a look in the
> HTML view of firebug.
No it won't. He didn't make the same mistake (using parentNode) on this
line as on the previous line.
|