How to get selected radio button values?
<p>I need get the selected radio button values. Radio button name is <code>is_external</code></p>

<p><strong>test.html</strong></p>

<pre><code>&lt;div class="exter_inter"&gt;
    External &lt;input type="radio" name="is_external" value="1" &lt;?php if(isset($_GET['status']) &amp;&amp; $_GET['status']=='1') echo "checked";?&gt; /&gt;
    Internal &lt;input type="radio" name="is_external" value="0"  &lt;?php if(isset($_GET['status']) &amp;&amp; $_GET['status']=='0') echo "checked";?&gt;  /&gt;
&lt;/div&gt;
</code></pre>

<p><strong>script.js</strong></p>

<pre><code>$(document).ready(function() {  
    $('input:radio').change(function() {      
        var is_external = $("input[name='radio']:checked").val();   
        alert("selected values: " + is_external); //Return undefined  

    });
} ); 
</code></pre>