Discussion: Change class problem
Afficher un message
Vieux 09/04/2008, 14h51   #5
Harlan Messinger
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut 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.
  Réponse avec citation
 
Page generated in 0,05170 seconds with 9 queries