Category: Javascript

In this short tutorial, I will show you How you can check or uncheck all checkboxes and list box options using jQuery and JavaScript. I use them many times within projects.

When its required

It is required when you have the list of items and you have to select multiple items from the list.

Let me explain with an example –

You are creating a department information form where you also have the list of users, In that case for assigning users you need to check them one by one.

In some cases, you need to assign all users to a department for that you either do it by checking one by one which is a time-consuming process when you have lots of users or create a separate checkbox for this. On a single click, you can either checked them all or uncheck it.

Javascript Jquery

Looping statement is use to execute and repeat a block of statements depending on the condition. In Javascript, we have the following looping statements –  while do while for while…

Javascript

When we adding Javascript code to HTML page then it must be in between <script> and </script> tags. We can place Javascript in <body> and <head> section of an HTML…

Javascript

A comment in Javascript code is a line that is not read/executed as part of the program. Its only purpose is to be read by someone who is editing the code.…

Javascript