<script>
$(document).ready(function() {
$('#bt_save').click(function() {
var Contract_Period = '';
var Campaign_Period = '';
var Targets = '';
var chkActuals = '';
$('input[id="Contract_Period"]').each(function(e) {
if (this.checked) {
Contract_Period = $('#Contract_Period').attr('id');
}
});
$('input[id="Campaign_Period"]').each(function(e) {
if (this.checked) {
Campaign_Period = $('#Campaign_Period').attr('id');
}
});
$('input[id="Targets"]').each(function(e) {
if (this.checked) {
Targets = $('#Targets').attr('id');
}
});
$('input[id="chkActuals"]').each(function(e) {
if (this.checked) {
chkActuals = $('#chkActuals').attr('id');
}
});
});
});
</script>I need to get the checked checkbox ids using jQuery in MVC4 and want to pass those ids to controller.
