There are multiple checkboxes and I want to transfer data of checked boxes to an array. I know how to do that but the problem is that it stores data in an array in a sorted way. I am using javascript.
Example: See the attached screenshot of checkboxes
If I click in an order: 1 > 2 >5 >4 then array results in 1 2 4 5. I do not want that. I want the data to be stored in the order it was selected and not in increasing order of index. Please help me with this. Thanks in advance.
Aucun commentaire:
Enregistrer un commentaire