How to create tag and tag attributes and append to body using JQuery?

Using below program, We can able to paragraph tag to the HTML body with text and attribute.


    <title>How to Create Paragraph Dynamically using JQuery</title>
        <script src="" type="text/javascript"></script>
        $('<p></p>').text('this is paragraph example from').appendTo('body');

        $('<p></p>').text('this is second paragraph example from').attr('id','paragraphtext').appendTo('body');

If you have any queries or suggestions, please feel free to ask in comments section.
Share this post :

Post a Comment

Please give your valuable feedback on this post. You can submit any ASP.NET article here. We will post that article in this website by your name.

Support : Ranga Rajesh Kumar
Copyright © 2012. ASP.NET Examples - All Rights Reserved
Site Designed by Ranga Rajesh Kumar