javascript or jquery - get the last 2 characters of href
<p>I need to get the last 2 characters from the href of a link and place them into a string.</p>

<p>I'm sure this is fairly simple but I seem to be struggling.</p>

<p>Here's the link</p>

<pre><code>&lt;a href="../mypage/?code=bb"&gt;test&lt;/a&gt;
</code></pre>

<p>I need to grab the "bb" part of the href.</p>
