with jQuery
$('div#content').html(loaded_html);
without
getElementById('content').innerHTML = loaded_html;
Although you can do it your own way, a better idea would be to send json and render pages in the browser using the same templates that you (possibly) use on the server. I use doT, which I consider the best of all JavaScript-based templates (e.g. EJS, underscore).
source share