hi, below is my sample code
var mydiv = document.createElement('div');
mydiv.style.padding = "0px";
var link = document.createDocumentFragment('a');
var img = document.createDocumentFragment('img');
// See the use of document fragments for performance
// Define the attributes of the anchor element
link.href = 'google.com';
img.src = 'http://sample.png';
img.width = "100px";
img.height = "100px";
link.appendChild(img); // append to link
mydiv.appendChild(link);
var html = mydiv.innerHTML;'
alert(html);
i need to create image inside anchor which is inside div tag and finally i need to get the html of div tag and i need ot use that for some other funcitonality. but the above code is not giving the inner html. please advice me what wrong and help me on achieving this