How to find substring of href with javascript
<p>I have the following output.</p>

<pre><code>&lt;tr id='row_27' valign='top'&gt;
...
...

&lt;td width="5%"&gt;&lt;a href="http://localhost/daikon2/index.php/projects/admin/delete_log/6/6/27" class="deleteme"&gt;&lt;img src="http://localhost/daikon2/assets/icons/delete.png"  alt="delete"  title="Delete Log" /&gt;&lt;/a&gt;&lt;/td&gt;
&lt;/tr&gt;
</code></pre>

<p>I want to get the last segments 27 in the href with javascript.</p>

<p>I tried the following but nothing happened.</p>

<pre><code>var id =href.substring(href.lastIndexOf("/") + 1);
                        alert (id);
</code></pre>

<p>Could anyone help me please?</p>

<p>Thanks in advance.</p>
