前端学习(450):多选框全选
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta http-equiv="X-UA-Compatible" content="ie=edge"> <title>Document</title> <style> table{border-collapse: collapse;} td{border: 1px solid #000000;width: 100px;height: 30px;text-align: center;} </style> </head> <body> <table> <tr> <td><input id="allCheck" type="checkbox"><label for="allCheck">全选</label></td> </tr> <tr> <td><input id="check0" type="checkbox"><label for="check0">选项0</label></td> </tr> <tr> <td><input id="check1" type="checkbox"><label for=