Posted By

kopeo on 08/17/10


Tagged

form javascript jquery


Versions (?)

Who likes this?

1 person have marked this snippet as a favorite

mchadwick


Checkbox toogle value


 / Published in: JavaScript
 

  1. <script type="text/javascript">
  2. $('#id').change(function () {
  3. if ($(this).attr("checked"))
  4. {
  5. $('#id').attr("value", 'ja')
  6. return;
  7. }
  8. $('#id').attr("value", 'nein')
  9. });
  10. </script>

Report this snippet  

You need to login to post a comment.