How to get the value from anchor tag using jQuery?
<pre><code>&lt;a href="" id="a1"&gt;myval&lt;/a&gt;
</code></pre>

<p>How to get the value which is in between anchor tag ie; here "myval" and then specify that value to a hidden box.I tried do it with my piece of code but couldn't figure it out.pls help</p>

<pre><code>&lt;script type="text/javascript"&gt;
    $(document).ready(function(){
        $("#a1").click(function(e){
            //var str=$("#a1").getVal();        
            alert('hello');
        }
    });
&lt;/script&gt;
</code></pre>
