Home > front end >  How do I realize click on any position can be selected in a <td> <td> the check box
How do I realize click on any position can be selected in a <td> <td> the check box

Time:09-24

I need is a table inside each cell has a check box, to implement any single cell can select the check box inside the cell, could you tell me how to do,

CodePudding user response:

 




CodePudding user response:

 









Ck1 & lt; Input type="checkbox" id="ck1" value="https://bbs.csdn.net/topics/ck1"/& gt;
Ck2 & lt; Input type="checkbox" id="ck2" value="https://bbs.csdn.net/topics/ck2"/& gt;
Ck3 & lt; Input type="checkbox" id="ck3" value="https://bbs.csdn.net/topics/ck3"/& gt;
Ck4 & lt; Input type="checkbox" id="ck4" value="https://bbs.csdn.net/topics/ck4"/& gt;

<script type="text/javascript">
The function getcontent (vv) {

Var cc=vv. FirstElementChild. Checked;
Var id=vv. FirstElementChild. Id;
If (cc) {
Document. The getElementById (id). Checked=false;
}
The else {
Document. The getElementById (id). Checked=true;
}

debugger;
}
</script>
  • Related