Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

how to uncheck a checkbox in jquery

$("#myCheckBox").prop("checked", false);
Comment

jquery set checkbox checked unchecked

//jQuery 1.6+ use
$('.checkbox').prop('checked', true);  //false for uncheck
//jQuery 1.5.x and below use
$('.checkbox').attr('checked', true);  //false for uncheck
Comment

jquery uncheck checkbox

$('#myCheckbox').prop('checked', true); // Checks it
$('#myCheckbox').prop('checked', false); // Unchecks it
Comment

get unchecked checkbox jquery

if ($("#check_box_id").is(':checked')) {
  alert("checked");
}else{
  alert("unchecked");
}
Comment

jquery checkbox unchecked

$("input:radio[name='NAME']:radio[value='VALUE']").attr("checked",true);
$("input:radio[name='NAME']").removeAttr("checked");
Comment

check / unchecked a checkbox with jQuery

<html>
<head>
<title>jQuery check / uncheck a check box example</title>
 
<script type="text/javascript" src="jquery-1.3.2.min.js"></script>

</head>

<body>

<h1>jQuery check / uncheck a check box example</h1>

<script type="text/javascript">

  $(document).ready(function(){

    $("#isCheck").click(function () {
		
	alert($('input:checkbox[name=checkme]').is(':checked'));
			
    });
	
    $("#checkIt").click(function () {
		
	$('input:checkbox[name=checkme]').attr('checked',true);
			
    });
	
    $("#UnCheckIt").click(function () {
		
	$('input:checkbox[name=checkme]').attr('checked',false);
			
    });	
		
  });
</script>
</head><body>

<input type="checkbox" name="checkme">Check Me</input>

<br/>
<br/>
<br/>

<input type='button' value='Is Check' id='isCheck'>
<input type='button' value='Check It' id='checkIt'>
<input type='button' value='UnCheck It' id='UnCheckIt'>

</body>
</html>
Comment

how to get checked and unchecked checkbox value in jquery

$('#submit').click(function(){
		var redval = $('.red').val();
		var grenval = $('.green').val();
		$('.showCheckedValue').text(redval+'&'+grenval );
	});
Comment

PREVIOUS NEXT
Code Example
Javascript :: javascript how to get subarray 
Javascript :: create dynamic element in javascript 
Javascript :: js map object to array 
Javascript :: react router 6 multiple routes layout 
Javascript :: get zipcode from google places autocomplete 
Javascript :: what is json 
Javascript :: how to write in js 
Javascript :: axios.filter 
Javascript :: jquery add option if not exist 
Javascript :: code that will execute at a certain day and time javascript 
Javascript :: op in sequelize 
Javascript :: creating 2d array in javascript 
Javascript :: mdn clonenode 
Javascript :: rails to json 
Javascript :: mongoose express js require 
Javascript :: js mouse move activate 
Javascript :: how to crash with js 
Javascript :: reverse the string in javascript 
Javascript :: convert jquery to string 
Javascript :: decrement operator in javascript 
Javascript :: open new window javascript 
Javascript :: export default react 
Javascript :: path.join nodejs 
Javascript :: how to get the current time of a audio in js 
Javascript :: jQuery hello world program 
Javascript :: html select specify deafult select by js variable 
Javascript :: get methods on an js object 
Javascript :: generate uuid from string js 
Javascript :: react functional components 
Javascript :: google recaptcha reload 
ADD CONTENT
Topic
Content
Source link
Name
6+6 =