[Javascript] removeChild() ???

Mikael Lindström mikael.lindstrom at nipsoft.se
Thu Jan 31 07:36:18 CST 2002


Thank you ... but I'm not clear enough,

i wanted to remove some of the elements, the ones created using cloneNode.

Anyway, I figured it out now (last mail)

Thanks again for your suggestions

Michael

> -----Original Message-----
> From: javascript-admin at LaTech.edu 
> [mailto:javascript-admin at LaTech.edu]On
> Behalf Of Peter-Paul Koch
> Sent: Thursday, January 31, 2002 12:48 PM
> To: javascript at LaTech.edu
> Subject: RE: [Javascript] removeChild() ???
> 
> 
> 
> >Well...nevermind.
> >
> >Iwanted to remove the childs of the td:s and it didn't work.
> 
> var x = document.getElementsByTagName('TD');
> for (var i=0;i<x.length;i++)
>   while(x[i].childNodes[0]) x[i].removeChild(x[i].childNodes[0])
> 
> This removes all children of all TD's in the document.
> 
> ppk
> 
> _________________________________________________________________
> MSN Photos is the easiest way to share and print your photos: 
> http://photos.msn.com/support/worldwide.aspx
> 
> _______________________________________________
> Javascript mailing list
> Javascript at LaTech.edu
> https://lists.LaTech.edu/mailman/listinfo/javascript
> 
> 




More information about the Javascript mailing list