R
R
Roman Frell2022-04-21 14:36:53
JavaScript
Roman Frell, 2022-04-21 14:36:53

How to make auto select radio when checkbox is selected?

There are two type="checkbox" for example - "Open" and "Vip"
and there is type="radio" - with two options "Hide product" - Yes \ No (the default is No)

It is necessary that when choosing the checkbox "Vip" - radio changed from No to Yes

Answer the question

In order to leave comments, you need to log in

1 answer(s)
B
buddharisus, 2022-04-21
@buddharisus

Let A = .document.querySelector(."checkbox")
Let B = .document.querySelector(."radio")
If(A.status === true) {
B.status = A.status
}

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question