1
function rblSelectedValue() {

    var radio = document.getElementsByName('rblInterview');
    for (var i = 0; i < radio.length; i++) {
        if (radio[i].checked == true) {
            // document.getElementById('txt1').value = radio[i].value;

            var value1 = radio[i].value
            var radio1 = document.getElementsByName('rblPrefBatch');
            radio1[i].value = value1;
            radio1[i].checked = true;
            // alert(radio[i].value);

        }

    }

}

function ForNext(ctrlid) 
{
    var DdlYear = document.getElementById("<%= DdlYear.ClientID %>")

    if (document.getElementById(ctrlid).checked)
         {

            document.getElementById('<%=PanelView.ClientID %>').style.visibility = 'visible';
            // rblSelectedValue();
            document.getElementById('<%=txtpreYearofAppearing.ClientID%>').value = document.getElementById('<%=txtYearofAppearing.ClientID%>').value;
            document.getElementById('<%=txtpreupscrollno.ClientID%>').value = document.getElementById('<%=txtRollno.ClientID%>').value;
            document.getElementById('<%=txtaddidpre.ClientID%>').value = document.getElementById('<%=txtAddID.ClientID%>').value;
            document.getElementById('<%=txtaddyearpre.ClientID%>').value = document.getElementById('<%=DdlYear.ClientID%>').value;
            document.getElementById('<%=txtpreNoOfAttempt2009.ClientID%>').value = document.getElementById('<%=txtNoOfPrevAttempts.ClientID%>').value;
            document.getElementById('<%=txtPrePrelim.ClientID%>').value = document.getElementById('<%=txtPrelimi.ClientID%>').value;
            document.getElementById('<%=txtpremain.ClientID%>').value = document.getElementById('<%=txtMain.ClientID%>').value;
            document.getElementById('<%=txtpregs.ClientID%>').value = document.getElementById('<%=txtGS.ClientID%>').value;
            document.getElementById('<%=txtpreopt.ClientID%>').value = document.getElementById('<%=txtOptional.ClientID%>').value;
            document.getElementById('<%=rblPreint.ClientID%>').value = document.getElementById('<%=rblInterview.ClientID%>').value;
            document.getElementById('<%=txtpreother.ClientID%>').value = document.getElementById('<%=txtCorseothers.ClientID%>').value;

        }
        else 
        {
            document.getElementById('<%=PanelView.ClientID %>').style.visibility = 'hidden';

        }
    } 
4

2 回答 2

0

它是一个简单的函数调用,例如

rblSelectedValue();

但只需在 html 页面中包含两个 javascript 文件。

于 2013-08-24T09:43:10.437 回答
0
function one(){
//code
}

function two(){
//more code
one(); //calling function "one"
}
于 2013-08-24T09:44:05.093 回答