document.getElementById('mydiv').innerHTML = "Hello World";
However with jQuery you can simply type:
To change the content of a block that has a certain class you would type:
Now in order to get the contents of any DIV or class or anything else you can select you would use the following code:
var mycontent = $('.myclass').html();
As you can tell using jQuery’s html function you can save yourself a lot of typing as well as give your code more power and flexibility.