Alex Rivera | Logout

jquery, unselect checkbox by value

Asked 2010-08-11T20:04:05.973
18

i have many checkbox:

    <input type="checkbox" name="checkbox_user" value = "1"/>
    <input type="checkbox" name="checkbox_user" value = "2"/>   
    <input type="checkbox" name="checkbox_user" value = "3"/>
...

and checkbox with value 2 is selected. Is possible unselect checkbox (with jQuery) when i now only value.

Edit
Report

1 Answer

48
$("input:checkbox[value=2]").attr("checked", true);
answered 2010-08-11T20:05:56.223

Your Answer