How to get multiple value of checkbox?

Posted by Poomjai on Stack Overflow See other posts from Stack Overflow or by Poomjai
Published on 2010-03-22T18:27:19Z Indexed on 2010/03/22 18:31 UTC
Read the original article Hit count: 391

Filed under:
|
|

I has checkbox the list of media in my webpage

<input name="c1"  type="checkbox" value=<%= item.MediaId %> />> mediaA
<input name="c1"  type="checkbox" value=<%= item.MediaId %> />> mediaB
<input name="c1"  type="checkbox" value=<%= item.MediaId %> />> mediaC

In my javascript,How can i keep the checkbox value inside the array for example

if user check for mediaA and mediaC in array will be {12,14}

Thanks ^_^

© Stack Overflow or respective owner

Related posts about ASP.NET

Related posts about JavaScript