Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New to the CF scene
    Join Date
    Oct 2012
    Location
    San Jose
    Posts
    9
    Thanks
    0
    Thanked 2 Times in 2 Posts

    clear contents of div tag

    How to clear the contents of the div tag dynamically?

  • #2
    Senior Coder rnd me's Avatar
    Join Date
    Jun 2007
    Location
    Urbana
    Posts
    4,596
    Thanks
    11
    Thanked 616 Times in 596 Posts
    Code:
    div.innerHTML=""
    or, given <div id=div1>:
    Code:
     div1.innerHTML="";
    Create, Share, and Debug HTML pages and snippets with a cool new web app I helped create: pagedemos.com


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •