How to detect checkbox being checked using javascript


jqueryDue to some limitation, i can’t use onClick javascript event to detect checkbox being checked. Alt solution to auto detect checkbox being checked in the page using jQuery javascript framework. I just embed few lines of javascript and it will auto detect all the checkbox status in a page. jQuery is too awesome. but too bad i dun really like Javascript, tat’s y i’m writing such an stupid easy tutorial for myself.

To detect checkbox being checked using jQuery javascript framework, follow the steps below

Advertisements

  • Load jQuery framework at the <head> of your page.
  • Embed the code below after your form and make sure you replace the ‘your_checkbox_name‘ below to your real checkbox name.
  • Refresh your page and try to tick on your checkbox and it should show an alert now.

Related posts:






Share this with your friends:-

Leave a Reply