Showing posts with label multickeckbox. Show all posts
Showing posts with label multickeckbox. Show all posts

Friday, 18 May 2018

Multple checkbox selected or not

<script type="text/javascript" src='jquery.js'></script>
<script type="text/javascript">
$(document).ready(function() {
$('#extend_auto_expired').click(function(){
$("input[type=checkbox]:checked").each(function() {
alert( $(this).val() );
});
});
});
</script>
<center>
<form name='ck'>
<?php
for($r=0; $r<10;$r++){
echo "<input type='checkbox' name='t[]' value='$r'>$r<br>";
}
?>
<input type="button" id="extend_auto_expired" value="Extend auto expired" class="buttongreen" name="Submit">
</form>
<center>