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 :: owl-carousel only for mobile 
Javascript :: node red admin password setting 
Javascript :: tailwind hover dont work 
Javascript :: today date js 
Javascript :: react open pdf in new tab 
Javascript :: nested loops javascript 
Javascript :: js get type of variable 
Javascript :: how to use url parameters in react 
Javascript :: jquery find children not working 
Javascript :: javascript set html select value 
Javascript :: react type div onClick 
Javascript :: sequelize dialect 
Javascript :: how to change style of an element using javascript 
Javascript :: javascript constructor function vs factory function 
Javascript :: how can i validate a password without regex in js 
Javascript :: webpack react proxy not working 
Javascript :: onchange js 
Javascript :: how to trap js errors window.onerror 
Javascript :: js document.addEventListner 
Javascript :: javascript string includes substring 
Javascript :: how to add variables to an array 
Javascript :: chrome.tabs.query( 
Javascript :: js conditional object 
Javascript :: two sum javascript 
Javascript :: regex for exactly n digits 
Javascript :: nodejs https server 
Javascript :: add scss in next js 
Javascript :: react useref 
Javascript :: 2d array to 1d array javascript 
Javascript :: js enum 
ADD CONTENT
Topic
Content
Source link
Name
4+8 =