-5
<li><input class="checkbox" type="checkbox"> This is Item 1</li>
<li><input class="checkbox" type="checkbox"> This is Item 2</li>
<li><input class="checkbox" type="checkbox"> This is Item 3</li>
<li><input class="checkbox" type="checkbox"> This is Item 4</li>
<li><input class="checkbox" type="checkbox"> This is Item 5</li>
<li><input class="checkbox" type="checkbox"> This is Item 6</li>

I want to click on a checkbox, then check in multiple checkboxes or one or three checkboxes will be auto checked. How can i do?

ali541
  • 1
  • 1
    Did you try anything? – Mamun Jul 13 '18 at 13:30
  • Your question does not make much sense. Could you edit it to include your desired output and show the attempts you've made to solve this yourself – Rory McCrossan Jul 13 '18 at 13:32
  • @Mamun sir, i have done all select checkbox but i want to click one checkbox then select multiple checkbox or two or three check. – ali541 Jul 13 '18 at 13:38
  • Your words are not understandable, you do not have any attempted code as well so that someone can predict the issue you are facing. – Mamun Jul 13 '18 at 13:56
  • @ali541 you are going to need to use Javascript in order to make that happen. Using an OnClick function and assign some ids to your input. If you gave an example it would help clarify things a bit. – Tekill Jul 13 '18 at 14:13
  • You need to be good at google search, if you search a little you will find lot of resource, this is for binding event to checkbox https://api.jquery.com/change/ and this is for checking other checkboxs https://stackoverflow.com/a/426276/2060913 – asifsaho Jul 13 '18 at 14:35

1 Answers1

0

1.First you should add ids or names for each checkbox.
2.Create a function that checks which checkbox is checked and implement your logic.