<! xmlns = 'http: //www.w3.org/1999/xhtml' xml: lang = 'en'> <head> <meta http-equiv = 'content-type' content = 'text/html; charset = utf-8 '/> <meta http-equiv =' content-language 'content =' en-us '/> <botes> Caixa de seleção Selecione </title> <script type =' text/javascript 'src =' jQuery-3.0.0.js '> </script> <script type =' text/javscrint '' ' > $ (document) .ready (function () {/**** ---- 全选 ---- **** /// $ ('#check1'). // 方法一 if (this.Checked == true) {$ ('input'). Prop ('verificado', true);} else {$ ('input'). Prop ('verificado', false);} if ($ ((do ". } else {$ (". do"). Texto ("全选"); /**** ---- 第一列 ---- ****/$ ('#checkl1'). On ('clique', function () {// 方法一 if (this.checked == true) {$ ('#check11,#check21,#check31,#chec k41,#check51 '). prop (' verificado ', true);} else {$ ('#check11,#check21,#check31,#check41,#check51 '). prop (' verificado ', false);} // 方法二如上});/**** ---- 第二列 ---- ****/$ ('#checkl2'). On ('clique', function () {// 方法一 if (this.checked == true) {$ ('#check12,#verificação22,#check32,#c heck42,#check52 '). prop (' verificado ', true);} else {$ ('#check12,#check22,#check32,#check42,#check52 '). prop (' verificado ', false);} // 方法二如上});/**** ---- 第三列 ---- ****/$ ('#checkl3'). On ('clique', function () {// 方法一 if (this.checked == true) {$ ('#verificação13,#check23,#check33,#c heck43,#check53 '). prop (' verificado ', true);} else {$ ('#check13,#check23,#check33,#check43,#check53 '). prop (' verificado ', false);} // 方法二如上});/**** ---- 第四列 ---- ****/$ ('#checkl4'). On ('clique', function () {// 方法一 if (this.checked == true) {$ ('#verificação14,#verificação24,#check34,#c heck44,#check54 '). prop (' verificado ', true);} else {$ ('#check14,#check24,#check34,#check44,#check54 '). prop (' verificado ', false);} // 方法二如上});/**** ---- 第一行 ---- ****/$ ('#checkh1') Heck13,#check14 '). Prop (' verificado ', true);} else {$ ('#check11,#check12,#check13,#check14 '). prop (' verificado ', false);} // 方法二如上});/**** ---- 第二行 ---- ****/$ ('#checkH2'). On ('clique', function () {// 方法一 if (this.checked == true) {$ ('#verificação21,#verificação22,#c heck23,#check24 '). Prop (' verificado ', true);} else {$ ('#verificação21,#verificação22,#check23,#check24 '). prop (' checked ', false);} // 方法二如上});/**** ---- 第三行 ---- ****/$ ('#checkH3'). On ('clique', function () {// 方法一 if (this.checked == true) {$ ('#verificação31,#check32,#c heck33,#check34 '). prop (' verificado ', true);} else {$ ('#verificação31,#verificação32,#check33,#check34 '). prop (' verificado ', false);} // 方法二如上});/**** ---- 第四行 ---- ****/$ ('#checkH4'). On ('clique', function () {// 方法一 if (this.checked == true) {$ ('#check41,#verificação42,#c heck43,#check44 '). prop (' verificado ', true);} else {$ ('#check41,#check42,#check43,#check44 '). prop (' verificado ', false);} // 方法二如上});/**** ---- 第五行 ---- ****/$ ('#checkh5'). On ('clique', function () {// 方法一 if (this.checked == true) {$ ('#verificação51,#verificação52,#c Heck53,#check54 '). Prop (' verificado ', true);} else {$ ('#check51,#check52,#check53,#check54 '). prop (' verificado ', false);} // 方法二 如上});});</script></head><body><table><tr><td><input type="checkbox" id = "check1" /><label for="check1">全选</label></td><td><input type="checkbox" id = "checkl1" /><label for="checkl1">第一列</label></td> <Td> <input type = "Checkbox" id = "checkl2"/> <Label for = "checkl2"> 第二列 </elabel> </td> <td> <input type = "caixa de seleção" id = "checkl3"/> <belp for = "checkl3"> 第三列 </label> </td> <t> <input para = "checkl3"> 第三列 </label> </td> <t> <input para = "checkl3"> 第三列 </etc. Para = "checkl4"> 第四列 </crety> </td> </tr> <tr> <td> <typ type = "caixa de seleção" id = "checkh1"/> <etiqueta para = "checkh1"> 第一行 </cret> </td> <td> <input type = "check" iD = "check" </td> /> </td> <td> <input type = "caixa de seleção" id = "check13"/> </td> <td> <input type = "caixa de seleção" id = "check14"/> </td> </tum <tr> <t> <td> <input type "check" = "checkh2"/> <t> type = "Caixa de seleção" id = "check21"/> </td> <td> <input type = "caixa de seleção" id = "check22"/> </td> <td> <tipo de entrada = "caixa de seleção" id = "check23"/> </td> <td> <input type = "treckBox =" " TIPO = "Caixa de seleção" id = "checkH3"/> <Label para = "checkH3"> 第三行 </cretel> </td> <td> <input type = "caixa de seleção" id = "check31"/> </td> <td> <td> <input Type = "Check" id = "" Check "/> </td> <td> /> </td> <td> <input type = "caixa de seleção" id = "check34"/> </td> </tr> <tr> <td> <input type = "caixa de seleção" id = "checkh4"/> <belt para = "checkh4"> 第四行 </etc. type = "Caixa de seleção" id = "check42" /> </td> <td> <input type = "caixa de seleção" id = "check43" /> </td> <td> <tipo de entrada = "caixa de seleção" id = "check44" /> </td> < /tr> <tr> <td> <nput type = "checkhBox" /> </td> < /tr> <t> <td> <input type = " Para = "checkh5"> 第五行 </crety> </td> <td> <input type = "caixa de seleção" id = "check51"/> </td> <td> <input type = "checkbox" id = "check52"/> </td> <td> <input type = "checkbox" id = "check53" "/> "Check54"/> </td> </tr> </tbody> </body> </body> </html>效果图
以上所述是小编给大家介绍的 Caixa de seleção 选中一个另一个 Caixa de seleção 也会选中的实现代码的全部叙述 , 希望对大家有所帮助 , 如果大家想了解更多内容敬请关注武林网! 如果大家想了解更多内容敬请关注武林网!