js单选按钮的默认值

function SelectWindow(str) { 

initradio('PhysiotherapyOptionsTable.Sex',sex);      

 function initradio(rName,rValue){
                var rObj = document.getElementsByName(rName);
                for(var i = 0;i < rObj.length;i++){
                    if(rObj[i].value == rValue){
                        rObj[i].checked =  'checked';
                    }
                }
            }

posted @ 2016-11-21 17:15  彳^_^易  阅读(997)  评论(0编辑  收藏  举报