Solved

Clear contents of Div Tag using JavaScript

Posted on 2009-05-06
2
1,288 Views
Last Modified: 2012-05-06
Hi to all,

I am still learning Javascript and was wondering how I would clear the contents of a div tag?

I am using Visual Studio 2008 as well as the JQuery Library.

Thanks
0
Comment
Question by:ALawrence007
2 Comments
 
LVL 12

Accepted Solution

by:
Gibu George earned 500 total points
ID: 24315525
document.getElementById().innerHTML='';
0
 

Author Closing Comment

by:ALawrence007
ID: 31578491
Thanks gibu_george,
Easy and simple..
0

Featured Post

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

There are a couple ways to attach a JavaScript function to dynamically created elements. You can make a new script for each element as it’s created or you can use delegation. Delegation allows a single script that is added at page creation to mat…
I found this questions asking how to do this in many different forums, so I will describe here how to implement a solution using PHP and AJAX. The logical flow for the problem should be: Write an event handler for the first drop down box to get …
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

777 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question