[Javascript] removeChild() ???

Peter-Paul Koch gassinaumasis at hotmail.com
Thu Jan 31 05:47:48 CST 2002


>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




More information about the Javascript mailing list