In this post we are going to see how to select all the checkbox with JavaScript and jQuery. Selecting all checkbox is a simple task, as it just takes targeting the required checkbox and a click event.
Now let's jump to the coding. The code for selecting all theCheckoboxes goes as follows
In the code above
Now let's jump to the coding. The code for selecting all the
In the code above
- I have written a function selectAllNames (), which is called when the checkbox Select all Names is checked that is everytime this checkbox is clicked. I have used onClick () event for this.
- In the selectAllNames () function, I have targeted each checkboxes by its name attribute. Then by using the for loop I have checked all the checkboxes.
nice ..............
ReplyDelete