lundi 14 septembre 2015

How to get value of checkbox on check or un-check without submit form

i need help in checkbox trick. I want to change value when someone check or un-check checkbox. Here is my code:

<?php 
 if($params['status'] == "2"){ ?>
  <div class="pull-right" id="confirm-ship">
  <input type="checkbox" class="chkone"><br>
  if(checkbox == check){
    <span>Confirmed</span>
   }else{
    <span>Not Confirmed</span>
    }
  </div>
<?php
 }
?>

I want to show message confirmed or not confirmed when someone click on checkbox without submit a page or reload a page. Is it possible, anyone help me?

I just added below code on above scenario just for giving an idea.

if(checkbox == check){
        <span>Confirmed</span>
       }else{
        <span>Not Confirmed</span>
        }




Aucun commentaire:

Enregistrer un commentaire