Questions tagged [checked]

The `checked` attribute of the HTML `input` tag used to set the checked state of the control to “on” by default. Used to set the state of the `input` controls with the `type` attribute `"checkbox"` or `"radio"`.

The checked attribute of the HTML input tag used to set the checked state of the control to “on” by default. Used to set the state of the input controls with the type attribute "checkbox" or "radio".

Used to present one or more checkboxes in such a way that the state of the control at the point of page load is checked, and the user has to opt out rather than opting in, or perhaps presenting the user with a form — including a series of checkboxes — that he or she has previously filled in, and preserve the state of the selections that were made. The checked attribute allows you to set the checked state to “on” by default.

The checked attribute is also used for radio input controls. Unlike the checkbox, only one in a range of related radio inputs can be selected, and the checked attribute is used to identify which one is selected. If you accidentally mark as "checked" a number of radio inputs that share a given name attribute, the last one that’s marked as such will be selected.

Details: http://reference.sitepoint.com/html/input/checked

813 questions
10
votes
5 answers

Check only one ToolStripMenuItem

I have a ToolStrip with multiple ToolStripDropDownButtons, each has a set of DropDownItems. When the user clicks on an DropDownItem, the check mark is shown. By default, multiple items can be clicked and therefore multiple check marks appear. What…
Isuru
  • 30,617
  • 60
  • 187
  • 303
9
votes
1 answer

Event for $('input[type=radio]:checked')

This is my jQuery script: $("input[type=radio]:checked").live("click", function() { $(this).attr("checked",false); }); I want to make all my radio button can be checked and unchecked. The code suppose to trigger ONLY when checked radio being…
Coisox
  • 1,002
  • 1
  • 10
  • 22
9
votes
5 answers

JS .checked vs jquery attr('checked'), what is the difference?

I can't figure this one out. According to W3 Schools, the checked property sets or returns the checked state of a checkbox. So why does $('input').checked ? $('div').slideDown() : $('div').slideUp(); not work? Using prop however, does…
Jacob Raccuia
  • 1,666
  • 1
  • 16
  • 25
8
votes
3 answers

Which way to test if an element is checked is better? .is(':checked') or .prop('checked')

Both .is(':checked') and .prop('checked') can be used to test if a checkbox is checked. Are there any interesting/important differences between those two ways of querying the checked state or is it pretty much only a matter of personal preference?
ThiefMaster
  • 310,957
  • 84
  • 592
  • 636
8
votes
5 answers

How Can I get the text of the selected radio in the radio groups

as said in the title for example:
Michael
  • 95
  • 1
  • 1
  • 6
8
votes
4 answers

How do you get the checked value of asp:RadioButton with jQuery?

I need to do something like this: and be able to check the value of the radio button's checked value in jQuery, but my attempts like these don't return true/false. if…
Dan Bailiff
  • 1,513
  • 5
  • 23
  • 38
7
votes
1 answer

vue input radio not checked with v-model

When I use :checked, it works. But if I add v-model, it does not work.

zayed
  • 374
  • 2
  • 4
  • 15
7
votes
9 answers

check whether checkbox is checked or not using jquery

I want to check whether checkbox is checked or not using jquery. I want to check it on checkbox's onclick event. Is…
gautamlakum
  • 11,815
  • 23
  • 67
  • 90
7
votes
2 answers

Clear input fields when checkbox is checked

I have a check box and two input fields. Either the check box has to be checked or the two input fields have to be filled in. I'm doing validation using Angular i.e. ng-show, ng-required. When the checkbox is checked the two input fields are…
rsford31
  • 145
  • 1
  • 1
  • 9
7
votes
7 answers

jQuery After page loaded, check if radio button selected

I can easily grab the value or check if a radio button is selected using the .click(function() but what I need to do if check to see if a radio button is selected and/ or grab its value after a page has loaded (i.e. some radio buttons are…
Homer_J
  • 3,277
  • 12
  • 45
  • 65
7
votes
3 answers

see if radiobuttons or checkboxes are checked in IE8

I'm using a nice short CSS-only method I found on these boards to use checkboxes and radiobuttons of my own design in an online application I'm developing. What I do is I hide the radios and checks and show my graphics as a background in the label…
Fake Haak
  • 226
  • 1
  • 3
  • 7
7
votes
2 answers

How to know if a checkbox or radio button is checked in Dart?

I have a checkbox and a radio button group and I want to know if the checkbox is checked and which radio button is selected. How do I do this in dart?
Eduardo Copat
  • 4,941
  • 5
  • 23
  • 40
7
votes
1 answer

Good practices for Java exceptions handling

I have some questions regarding handling exceptions in Java. I read a bit about it and got some contradicting guidelines. Best Practices for Exception Handling Let's go through the mentioned article: It states that one should generally avoid using…
Michał Wróbel
  • 558
  • 1
  • 4
  • 13
6
votes
6 answers

Java unchecked/checked exception clarification

I've been reading about unchecked versus checked questions, none of the online resources have been truly clear about the difference and when to use both. From what I understand, both of them get thrown at runtime, both of them represent program…
donnyton
  • 5,874
  • 9
  • 42
  • 60
6
votes
3 answers

How to prevent unchecking all checkboxes using jquery?

I have custom checkboxes:

uzhas
  • 895
  • 4
  • 13
  • 27
1 2
3
54 55