U
U
Uzair Izha2015-10-29 01:13:35
PHP
Uzair Izha, 2015-10-29 01:13:35

How to make a checkbox inactive?

I have an input with a checkbox , I need to make the checkbox inactive if the condition is true.

Answer the question

In order to leave comments, you need to log in

3 answer(s)
N
nirvimel, 2015-10-29
@UZEIR

Not active means disabled .
<input type="checkbox" disabled>

S
Sergey ZSA, 2015-10-29
@serjikz

if(your_condition_with_true) $(".my_input").attr("disabled");
More or less like this. Without your code I can't make the example clearer.

A
Alexey S., 2015-10-29
@Winsik

<input type="checkbox" id="chbx" >

if (1==1) document.getElementById('chbx').disabled = true;

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question