a和b是什么啊,没定义
你在radio里onclick那就一定是checked了,不要判断了,我想楼主应该是想实现下面的情况
<input name=a>
<input name=b type=checkbox style="display:none">
<input name="RadioGroup1" type="radio" onClick="document.getElementById('a').style.display='';document.getElementById('b').style.display='none';" checked><input type="radio" name="RadioGroup1" onClick="document.getElementById('b').style.display='';document.getElementById('a').style.display='none';">
你在radio里onclick那就一定是checked了,不要判断了,我想楼主应该是想实现下面的情况
<input name=a>
<input name=b type=checkbox style="display:none">
<input name="RadioGroup1" type="radio" onClick="document.getElementById('a').style.display='';document.getElementById('b').style.display='none';" checked><input type="radio" name="RadioGroup1" onClick="document.getElementById('b').style.display='';document.getElementById('a').style.display='none';">
<font id='a'>a</font><br>
<font id='b'>b</font><br><input name="RadioGroup1" type="radio" onClick="if(this.checked==true){ a.style.display='';b.style.display='none'};"checked><input type="radio" name="RadioGroup1" onClick="if(this.checked==true){ a.style.display='none';b.style.display=''};">