Checkbox Data Dynamically Save to Database on Click

前端 未结 3 1364
逝去的感伤
逝去的感伤 2021-01-07 08:57

I need some js/ajax/jquery script saving data to database dynamically when I check the check-box. the checkboxes at the moment or loaded in next to records and change the va

3条回答
  •  有刺的猬
    2021-01-07 09:34

    Simple put...

    $('input:checkbox').click( function() {
      clicked = $(this).attr('checked');
      if (clicked) {
        /* AJAX the server to tell them it was clicked. */ }
      else {
        /* AJAX the server to tell them it was unclicked. */ } } );
    

提交回复
热议问题