checkbox - checked or unchecked with jquery and mysql

前端 未结 5 1492
清歌不尽
清歌不尽 2020-12-06 11:52

I am currently doing a system where it has to be possible to check/uncheck a checkbox. Everytime it changes status I need jquery to make and ajax call to a page, that update

5条回答
  •  陌清茗
    陌清茗 (楼主)
    2020-12-06 12:30

    Something like this probably?

    $('.checkbox').click(function (){
        var val = $(this).is(':checked');
        $.load('url_here',{status:val});
    });
    

提交回复
热议问题