
Apu
January 22, 2023 ›
#Attribute
›
#Button
❌
How to disable radio button
In this article, you will learn how to disable radio button. We will discuss two ways for disabling a radio button.
So, to disable a radio button, we can simply use the disabled attribute. On the other hand, we can use JavaScript checked property.
Disable a radio button using HTML attribute. #
In the first example, we will use the HTML disabled attribute to disable a radio button. Syntax :
<input type="radio" disabled="">
Click on the Try it Yourself » button to open the code in our online editor.
How to disable radio button in JavaScript. #
In the second example, we will use JavaScript checked property. The example is given below.
<input onclick="this.checked=false;" type="radio">
save
listen
AI Answer
How to disable radio button
0
In this article, you will learn how to disable radio button. We will discuss two ways for…
asked
Apu
0 answers
2915
In this article, you will learn how to disable radio button. We will discuss two ways for…
Answer Link
answered
Apu