WordPress vs Joomla vs Drupal, Which is more popular and user friendly
Which CMS is most popular and most user friendly in the world. Wordpress vs Joomla vs Drupal all are best cms. you need to decide what type of site you want
document.write and innerhtml both the functions are useful to adding the dynamic content in in Document.
So We need understand the similarities and differences and limitation about document.write and innerhtml.
First whenever and where you calls document.write function that more important.
Here I am going to show you how to use the document.write first.
Using above code you can print or execute the so much HTML content in DOM.
Here I am going to show you how to use the innerHTML in DOM.
Note: In your document “sample_Div” id with div need to be present.
put following code in your document.
<div id=\"sample_Div\"> Sample Text </div>
Loading iframe using innerhtml is the best techniqe and solution for web services and cross domain calls.
document.getElementById('sample_Div').innerHTML = "<iframe src='http://images.wordpressapi.com/'></iframe>";
Both the techniques are stand for as per situation and use