Friday, 1 June 2012

How TO Remove the Contents of a Div using JQuery

This  will show how to write a text/content into a div using  jquery and also it will show how to remove text/content.

 <script src="" type="text/javascript"></script>
 $(document).ready(function() {
 $("#click_me").click(function() {
 $("#write_me").html("Hello..Here I am  using jquery");

$("#clear_me").click(function() {

 <div id="write_me"></div>
 <input type="button" id="click_me" name="click_me" value="Write into the div">
 <input type="button" id="clear_me" name="clear_me" value="Clear Me">


No comments:

Post a Comment