当前位置:编程学习 > C#/ASP.NET >>

js里radiobuttonLIst控制层的显示或隐藏并兼容问题

function RadioButtonchange()

    var RadioListReceipt = DGL("RadioListReceipt");
    var Radio_list =  RadioListReceipt.getElementsByTagName("INPUT");
    var RadioListPayType = DGL("RadioListPayType");
    var Radio_Paylist =  RadioListPayType.getElementsByTagName("INPUT");
    //RadioListNetPaySource 网络支付类型
    var RadioListNetPaySource = DGL("RadioListNetPaySource");
    var Radio_NetPaylist =  RadioListNetPaySource.getElementsByTagName("INPUT");
    if(Radio_Paylist[3].checked)
    { 
       Radio_list[1].disabled=true;
       Radio_list[2].disabled=true
       Radio_list[1].checked=false;
       Radio_list[0].checked=true;
       Radio_NetPaylist[0].checked=true;
    }  
    else
    {  
        Radio_list[2].checked=true;
        Radio_list[0].disabled=false;
        Radio_list[1].disabled=false;
        Radio_list[2].disabled=false;
        Radio_NetPaylist[0].checked=false;
    }
    
    if(Radio_Paylist[0].checked)
    {
         document.getElementById('paymenu2').style.display = "block";
           
         var netpayType="<%=netpaysource %>";
         // alert(netpayType);
         if(netpayType==""||netpayType=="10")
         {
            Radio_NetPaylist[0].checked=true;
         }
         if(netpayType=="15")
         {
            Radio_NetPaylist[1].checked=true;
         } 
    }
    else
    {
      document.getElementById('paymenu2').style.display = "none";
      //$("#paymenu2").hide();
    }
}

window.onload=function(){
    RadioButtonchange();
}    


在选择其他项之后 这个'paymenu2'层在firefox、谷歌浏览器里还是隐藏不了!请教各位,谢谢了。 --------------------编程问答--------------------

if(Radio_Paylist[0].checked)
  {
  document.getElementById('paymenu2').style.display = "block";
   
  var netpayType="<%=netpaysource %>";
  // alert(netpayType);
  if(netpayType==""||netpayType=="10")
  {
  Radio_NetPaylist[0].checked=true;
  }
  if(netpayType=="15")
  {
  Radio_NetPaylist[1].checked=true;
  } 
  }
  //不要放在一个if语句里
  if(Radio_Paylist[0].checked==false)
  {
  document.getElementById('paymenu2').style.display = "none";
  //$("#paymenu2").hide();
  }
--------------------编程问答-------------------- 嗯,这样可以么?谢谢楼主了哈!
补充:.NET技术 ,  ASP.NET
CopyRight © 2012 站长网 编程知识问答 www.zzzyk.com All Rights Reserved
部份技术文章来自网络,