Add tag to body : appendTo « jQuery « JavaScript DHTML






Add tag to body

  


<html>
  <head>
    <script type="text/javascript" src="js/jquery-1.3.2.js"></script>
    <style type="text/css">
        .changeP { font-weight: bold; color:red;}
    </style>

    <script type="text/javascript">
   $(document).ready(function(){
     $("<div><p>Hello</p></div>").appendTo("body")


   });

    </script>
  </head>
  <body>

   <form>
      <input type="radio" value="Option">
   </form>

  </body>
</html>

   
    
  








Related examples in the same category

1.Add to body tag
2.appendTo(content): the reverse of $(A).append(B)