how to get checked value from radiobutton represented as variable?
<p>I would like to get checked value of some radiubutton.
That is not a problem when you using expression:</p>

<pre><code> $("input[name='radioname']:checked").val();
</code></pre>

<p>but I have a situation when I need to use DOM object from variable as below:</p>

<pre><code>var obj = $("[name=myradio1]");
</code></pre>

<p>and now I'm operating with variable obj.</p>

<p>Please explain how to get a checked value from <strong>obj</strong> variable</p>

<p>this is html code:</p>

<pre><code>&lt;input id="answer_21" type="radio" value="21" name="answer[1]"&gt;
&lt;input id="answer_22" type="radio" value="22" name="answer[1]"&gt;
</code></pre>
