Remove all child nodes : empty « jQuery « JavaScript DHTML






Remove all child nodes

    


<html>
  <head>
    <script type="text/javascript" src="js/jquery-1.3.2.js"></script>
    <script type="text/javascript">
        $(document).ready(function(){
             $("p").empty();

        });
    </script>


  </head>
  <body>
    <body>
       <p>Hello</p>

    </body>
</html>

   
    
    
    
  








Related examples in the same category

1.empty(): remove all event handlers and internally cached data.