jQuery RadioButtonList

今天同事问我 如何选择一个Radio 下面显示一个TR

 $(':radio[name=RadioButtonList1]').click(function () {           

  if ($(':radio[name=RadioButtonList1]:checked').val() == '22')               

    $("#td").show();           

  else               

    $("#td").hide();       

});

$("#rblDisplayType input[type=radio]").click(function () {               

  if ($('#rblDisplayType input[type=radio]:checked').val() == '5')                   

    $("#<%=td.ClientID %>").show();               

  else                   

    $("#<%=td.ClientID %>").hide();           

});

总结 :查看源代码 根据源代码去查找元素

posted @ 2011-05-31 16:28  m、y  阅读(278)  评论(0编辑  收藏  举报