Create and append text node : append « jQuery « JavaScript Tutorial






<html>
  <head>
    <script type="text/javascript" src="js/jquery-1.3.2.js"></script>
    <script type="text/javascript">
        $(document).ready(function(){
            $("div").html("<b>bold</b> not bold");
            $("div b").append(document.createTextNode("!!!")).css("color", "red");
        });
    </script>
  </head>
  <body>
    <body>
      <DIV></DIV>
  </body>
</html>








30.16.append
30.16.1.Add and remove text paragraph
30.16.2.Append HTML to
30.16.3.Add Text node created by document
30.16.4.Create and append text node
30.16.5.Appends some HTML to all paragraphs.
30.16.6.Appends an Element to all paragraphs.