Forgotten,
<script>
function checking(el) {
if (el.tagName == "INPUT" && el.type == "checkbox") {
if (el.checked) {
document.getElementById("sel").selectedIndex = 0;
}
else {
document.getElementById("sel").selectedIndex = 1;
}
}
if (el.tagName == "SELECT") {
if (el.value == "1") {
document.getElementById("check").checked = true;
}
else {
document.getElementById("check").checked = false;
}
}
}
</script>
<form>
<input type="checkbox" id="check" onClick="checking(this)" checked>
<select id="sel" onChange="checking(this)">
<option value="1">один</option>
<option value="2">два</option>
</select>
</form>
<script>
function radio_check(radio) {
switch (radio.value) {
case "1": {
document.getElementById("id1").disabled = true;
document.getElementById("id2").disabled = false;
break;
}
case "2": {
document.getElementById("id1").disabled = false;
document.getElementById("id2").disabled = true;
break;
}
}
}
</script>
<form>
<input type="radio" name="rad" value="1" onClick="radio_check(this)">1
<input type="radio" name="rad" value="2" onClick="radio_check(this)">2
<br>
<input type="text" id="id1"><input type="text" id="id2">
</form>