Then, access the checked property of the checkbox element. Upon selecting checkbox B or Checkbox C alone (single selection), in either of the case, Checkbox A should be disabled. I found everywhere this one.finally i found this by in this site.very simple and useful.good job.thank you.good luck. How to periodically run a Google Script on a Spreadsheet. In this we have declared a function disable() within which we are using getElement() property in which we are defining c id which is of the checkbox element and we are declaring it as getElement.disable this element. Not the answer you're looking for? The options Drink and Repeat are disabled by default. I can check both checkboxes B and C simultaneously in which case checkbox A should be disabled. How to Create a Dropdown List with Array Values using JavaScript ? How to manage only enabled checkbox will check? To disable a checkbox by default in HTML, you can use an attribute called disabled. it should put in body or anywhere can put it ? Get ID of clicked object, selected by Name. Generally, checkbox have different types like standard checkbox, radio checkbox, slider, toggle, read-only, checked, indeterminate, and disabled checkboxes. For checking and unchecking a checkbox, you can either use JavaScript or jQuery methods described below. I need to add an 'id' tag on the script to separate 'Q1-Q4' and 'Yes to all' checkbox given the scenario. For example, create an unordered list using the ul tag and set style to list-style: none; so that no bullet marks appear with the list items. How to set input type date in dd-mm-yyyy format using HTML ? You signed in with another tab or window. What keeps you from doing exactly that? Disable checkbox: Disable and enable checkbox by clicking button. I'm still fairly new to Javascript, so please forgive me if I sound stupid.