Top Ad unit 728 × 90

How to retrieve checkboxes values in jQuery

How to use jQuery to get the checked checkboxes values, and put it into a textarea immediately? Just like this code:
Here's one that works.
function updateTextArea() { var allVals = []; $('#divId :checked').each(function() { allVals.push($(this).val()); }); $('#t').val(allVals); } $(function() { $('#divId input').click(updateTextArea); updateTextArea(); });
How to retrieve checkboxes values in jQuery Reviewed by Ashok Sen on 19:49:00 Rating: 5
All Rights Reserved by ASENwebmedia © 2014 - 2015
Powered By Blogger, Developed by Asenwebmedia

Contact Form

Name

Email *

Message *

Powered by Blogger.