| |

VerySource

 Forgot password?
 Register
Search
Author: lovelovelove

Six radio choices, each of which has three check boxes. After selecting one of the radio choices, only the corresponding

[Copy link]

2

Threads

7

Posts

6.00

Credits

Newbie

Rank: 1

Credits
6.00

 Invalid IP Address

Post time: 2020-6-22 15:45:01
| Show all posts
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
  <TITLE> New Document </TITLE>
  <META NAME="Generator" CONTENT="EditPlus">
  <META NAME="Author" CONTENT="">
  <META NAME="Keywords" CONTENT="">
  <META NAME="Description" CONTENT="">
  <SCRIPT LANGUAGE="JavaScript">
  
  var n=-1;
function test(){
var radio=document.getElementsByName('one');
for(var i=0;i<radio.length;i++){
if(radio[i].checked){
var checkbox=document.getElementsByName('c'+i);
for(var j=0;j<checkbox.length;j++){
checkbox[j].disabled=false;
}
if(n!=-1){
checkbox=document.getElementsByName('c'+n);
for(var j=0;j<checkbox.length;j++){
checkbox[j].disabled=true;
}
}
n=i;
break;
}
}
The
}

  </SCRIPT>
</HEAD>

<BODY>

   <INPUT TYPE="radio" NAME="one" onclick=test() />
   <INPUT TYPE="checkbox" NAME="c0" disabled>
   <INPUT TYPE="checkbox" NAME="c0" disabled>
   <INPUT TYPE="checkbox" NAME="c0" disabled>
   <br>
   <INPUT TYPE="radio" NAME="one" onclick=test() />
   <INPUT TYPE="checkbox" NAME="c1" disabled>
   <INPUT TYPE="checkbox" NAME="c1" disabled>
   <INPUT TYPE="checkbox" NAME="c1" disabled>
   <br>
   <INPUT TYPE="radio" NAME="one" onclick=test() />
   <INPUT TYPE="checkbox" NAME="c2" disabled>
   <INPUT TYPE="checkbox" NAME="c2" disabled>
   <INPUT TYPE="checkbox" NAME="c2" disabled>
   <br>
   <INPUT TYPE="radio" NAME="one" onclick=test() />
   <INPUT TYPE="checkbox" NAME="c3" disabled>
   <INPUT TYPE="checkbox" NAME="c3" disabled>
   <INPUT TYPE="checkbox" NAME="c3" disabled>
   <br>
   <INPUT TYPE="radio" NAME="one" onclick=test() />
   <INPUT TYPE="checkbox" NAME="c4" disabled>
   <INPUT TYPE="checkbox" NAME="c4" disabled>
   <INPUT TYPE="checkbox" NAME="c4" disabled>
   <br>
   <INPUT TYPE="radio" NAME="one" onclick=test() />
   <INPUT TYPE="checkbox" NAME="c5" disabled>
   <INPUT TYPE="checkbox" NAME="c5" disabled>
   <INPUT TYPE="checkbox" NAME="c5" disabled>
   <br>
   <INPUT TYPE="radio" NAME="one" onclick=test() />
   <INPUT TYPE="checkbox" NAME="c6" disabled>
   <INPUT TYPE="checkbox" NAME="c6" disabled>
   <INPUT TYPE="checkbox" NAME="c6" disabled>
   <br>
   <INPUT TYPE="radio" NAME="one" onclick=test() />
   <INPUT TYPE="checkbox" NAME="c7" disabled>
   <INPUT TYPE="checkbox" NAME="c7" disabled>
   <INPUT TYPE="checkbox" NAME="c7" disabled>
   <br>

</BODY>
</HTML>
Reply

Use magic Report

You have to log in before you can reply Login | Register

Points Rules

Contact us|Archive|Mobile|CopyRight © 2008-2023|verysource.com ( 京ICP备17048824号-1 )

Quick Reply To Top Return to the list