How to retrieve checkboxes values in jQuery

Posted by lanqy on Stack Overflow See other posts from Stack Overflow or by lanqy
Published on 2009-04-24T14:45:48Z Indexed on 2010/03/29 12:13 UTC
Read the original article Hit count: 221

Filed under:
|

How to use jQuery to get the checked checkboxes values, and put it into a textarea immediately?

Just like this code:

 <html>
  <head>
 </head>
 <body>
  <div id="c_b">
   <input type="checkbox" value="one_name" checked>
   <input type="checkbox" value="one_name1">
   <input type="checkbox" value="one_name2">
  </div>  
 <textarea id="t"></textarea>
 </body>
 </html>

If the id="c_d" is updated by Ajax, the below of altCognito's code doesn't work. Is there any good solution?

© Stack Overflow or respective owner

Related posts about jQuery

Related posts about checkbox