title: How can I change <p> tag data dynamically after some defined time delay using javascript?
body: <p>I want to change only <code>&lt;p&gt;</code> tag contents using javascript after a defined time delay. For example a </p>
  
  <pre><code>&lt;p&gt;messages&lt;/p&gt;
  </code></pre>
  
  <p>should change depending on the no. of new messages came. As </p>
  
  <pre><code>&lt;p&gt;messages(1)&lt;/p&gt;
  &lt;p&gt;messages(2)&lt;/p&gt;
  </code></pre>