How to Get Radio Button Name and Id by its Tag Name when It is Checked?
<p>my code is here where i am counting the all radio button and checked radio button,</p>

<pre><code>var selection=new Array(); 
 var allR = document.getElementsByTagName('input');
  var a=0;
  var b=0;
    for(var i=0; i&lt;allR.length; i++){ 
        if(allR[i].type=='radio') { b++; }      
        if(allR[i].type=='radio' &amp;&amp; allR[i].checked) { a++; } 
    }
</code></pre>

<p>how to get radio button name and its id by its Tag name ???</p>

<p>hopes for your suggestions</p>
