PHP develops simple voting system administrator function module (3)
As shown in the picture, there are three options in the click button here: select all, cancel all and delete selected.
Click these buttons to select all items, deselect all items, and delete all selected voting items
First set the name attribute of the
In The name attribute is also used in .
And give each of the following 3 button buttons an onclick event
Use javascript to implement the function module of all click events,A for loop is used here to mark the selection.
Click "Select All" to make all checkboxes checked=true, click "Cancel All" to make all checkboxes checked=false unchecked.
If the check box is not selected, it means that the content ID is not selected. Click "Delete Selected" and the content will not be deleted and a prompt message will be displayed.
You can select a single ID to delete, or you can select all to delete.