jQuery - html()

html() is usually used for getting and setting the inner content of DOM elements (containing html).

 

Hello World

Chewbacca dooku darth chewbacca luuke c-3po luke moff. Maul vader c-3p0 secura. Jango ackbar wicket kessel k-3po. Antilles padmé solo k-3po jawa. Leia darth kamino gonk obi-wan jinn skywalker.

 


$("#btnGet").click(function ()
{ $("#demo1").html($("#source").html());  });

$("#btnSet").click(function ()
{ $("#demo1").html("Just what do you think you are doing <strong>Dave</strong>?"); });