In: Computer Science
What are the advantages and disadvantages of working with the innerHTML property?
Advantages :
1). Simple to employ containing quick processing through a browser.
2). Quicker when compared to constructing the content by employing the DOM (Document Object Model) methods.
Disadvantages :
1).User is permitted for allocating HTML which is not effectively generated, that could disturb the DOM tree.
2).Setting innerHTML can damage or spoil the present HTML elements which contain event handlers joined for them,there is a possibility of producing a memory release over few browsers.