Browser "view source" or "save web page" does not preserve dynamically created DOM objects. For that use below given function, which will open a new window with all the source code including dynamically created DOM objects -
Code:
function viewSource()
{
var win = window.open('','_blank');
var results = document.documentElement.innerHTML;
var match = "<";
var re = new RegExp("<", "g");
var newresults = results.replace(re, "<");
win.document.write('<pre>' +newresults+'</pre>' );
}