title: Last id of an Element Javascript
body: <p>How can i read the last element id using javascript?</p>
  
  <p>for example :</p>
  
  <pre><code>          &lt;div id='print'&gt;
  
                  &lt;p id=1&gt;some data&lt;/p&gt;
                  &lt;p id=2&gt;some data&lt;/p&gt;
                  &lt;p id=3&gt;some data&lt;/p&gt;
                  &lt;p id=4&gt;some data&lt;/p&gt;
                  &lt;p id=5&gt;some data&lt;/p&gt;
  
            &lt;/div&gt;
  </code></pre>
  
  <p>I need to detect the id of last <p></p>
  
  <p>I need max number of the id actually.it's generated sequentially.</p>