Home > Back-end >  Javascript 2 radiobuttonlist
Javascript 2 radiobuttonlist

Time:10-27

Automatically according to the value of the first radiobuttonlist to select another radiobuttonlist options, can need not jquery do?
If you use jquery to do?

CodePudding user response:

After the first triggered the onclick event, in the event of the function of the option of another radiobuttonlist DOM check operation

CodePudding user response:

The function result () {
Var rbltable=document. GetElementById (" ZGFpresident ");
Var RBS=rbltable. GetElementsByTagName (" INPUT ");
//var resultview=document. GetElementById (" TextBox1 ");
Var radioButtonstype=document. GetElementsByName (' resultauto ');
For (var I=0; i If (RBS [0]. Checked) {
//resultview. Value (" continue to be included in the list ") :
RadioButtonstype [1]. Checked=true;
}
The else
{
//resultview. Value (" temporarily not retain ") :
RadioButtonstype [0]. Checked=true;
}
}
}

CodePudding user response:

Write, but no effect ah ~ ~ ~
  • Related