读书人

急高手,什radio的onSelect事件

发布时间: 2012-02-16 21:30:36 作者: rapoo

急,高手,什radio的onSelect事件不?
一下,什ration的onSelect事件不生?,我把onSelect改成onClick可以,有有的javascript方法radio按控制藏。

+++++++++++++++++++++++++++++++++++++++
<td height= "25 " colspan= "3 " align= "left " nowrap class= "write_9 "> <input name= "app_result " type= "radio " value= "1 " id= "app_result " checked onSelect= "doNoView() ">
同意  
<input name= "app_result " type= "radio " value= "0 " id= "app_result " onSelect= "doView() ">
不同意 </td>
<tr id= "no_agree ">
<td width= "80 " height= "20 " align= "right " nowrap > 不同意原因: </td>
<td height= "20 " colspan= "3 " align= "left " >
<input name= "refuse_reason " type= "text " id= "refuse_reason " size= "60 " >
</td>
</tr>
<tr id= "no_agree_mail " >
<td width= "80 " height= "20 " align= "right " nowrap > 件提醒: </td>
<td height= "20 " colspan= "3 " align= "left " > <input name= "send_to " type= "text " id= "send_to " size= "60 " >
<input type= "button " name= "Button " value= "... " onClick= "openemail() " > </td>
</tr>
+++++++
function doView(){
try{
document.getElementById( "no_agree ").style.display= ' ';
document.getElementById( "no_agree_mail ").style.display= ' ';
}catch(e){}
}

function doNoView(){
try{
document.getElementById( "no_agree ").style.display= 'none ';
document.getElementById( "no_agree_mail ").style.display= 'none ';
}catch(e){}
}

------解决方案--------------------


onchange

onselect不是用在radio button上的
[解决办法]
onclick事件即使你不去点那个radio也会触发,你可以用键盘移动焦点试一下
放心用,没问题

读书人网 >JavaScript

热点推荐