HTML | How to enable the button only when the checkbox is checked | Simplest Way

preview_player
Показать описание
In this video, I will tell you how to enable the button only when the checkbox is checked in HTML.

So, it is very easy and simple to create a checkbox in HTML with the help of JavaScript.
It's really very simple.

This technique is very popular (and important) as it is often used in making websites with T&Cs.

Watch the full video without skipping it for the best understanding.

Subscribe Code Infinite with Arnav for more.

Comment if any doubt or issue regarding this video.
Рекомендации по теме
Комментарии
Автор

Hello Arnav, can you help me in this situation:

// start without being checked
Type: ( ) entry ( ) exit

If you check entry, show the select "country"

Type: (*) entry ( ) exit

// show country selection
<div>
<label>Country</label>
<select id="country" required>
<option value="">Choose...</option>
<option>United States</option>
<option>Italy</option>
<option>Portugal</option>
</select>
</div>

// If you check the output, show the "country" selection and the "quantity" radio
Type: ( ) entry (*) exit

// show country selection
<div>
<label>Country</label>
<select id="country" required>
<option value="">Choose...</option>
<option>United States</option>
<option>Italy</option>
<option>Portugal</option>
</select>
</div>

// show the quantity radio
Quantity: ( ) low ( ) high

Note: When starting up, the radios should show without being checked

NiltonOliv
Автор

what about various checkboxes? cause this is really simple

doni
Автор

Dont use disabled unless you want it, otherwise use hidden.
Dont use var use let or const
dont use onclick use addeventlistener

rafi-leigh
Автор

all i wanted to know was how to make a checkbox

rafi-leigh
welcome to shbcf.ru