E
E
Evgeny Pashkov2020-07-22 10:43:35
JavaScript
Evgeny Pashkov, 2020-07-22 10:43:35

How to get dataset from several checkboxes and display their sum?

There are 7 checkboxes. Each has its own data-price and data-color. I need to implement this in pure js.
1. At least 2 checkboxes must be selected.
2. You need to get all the dataset from the selected checkboxes, add them up and display the result. You need to get the amount of data-price and next to the amount of data-color.

Broke all the brains but did not come up with anything.
Ideally, do it all in ES6 classes.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Alexander, 2020-07-22
@Seasle

We work with your code. Without your code, they work here .

T
Tim, 2020-07-22
@Tim-A-2020

you will already understand with data-color

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question