Is there some function like: document.getElementById("FirstDiv").clear() ?

Views: 46

Replies to This Discussion

If you want to clear the div and remove all child nodes, you could put:

mydiv = document.getElementById('FirstDiv'); while ( mydiv.firstChild ) mydiv.removeChild( mydiv.firstChild );

You have to remove any event handlers you've set on the node before you remove it, to avoid memory leaks in IE.

RSS

PeopleSoft Jobs in US

Videos

  • Add Videos
  • View All

© 2025   Created by Maisam Agha.   Powered by

Badges  |  Report an Issue  |  Terms of Service