Search code examples
javascriptjqueryinnerhtml

How to replace innerHTML of a div using jQuery?


How could I achieve the following:

document.all.regTitle.innerHTML = 'Hello World';

Using jQuery where regTitle is my div id?


Solution

  • $("#regTitle").html("Hello World");