Skip to content

Instantly share code, notes, and snippets.

View southern-hu's full-sized avatar

southern southern-hu

View GitHub Profile
0xE64047afc31fdb6c50aab767DD874D17E08e1027
@southern-hu
southern-hu / form.html
Created April 20, 2013 02:06
Get checkbox values (name field) http://jsfiddle.net/dvCmR/
<div id="checkboxes">
<input id="chkbx_0" type="checkbox" name="c_n_0" checked="checked" /> Option 1
<input id="chkbx_1" type="checkbox" name="c_n_1" checked="checked" /> Option 2
<input id="chkbx_2" type="checkbox" name="c_n_2" checked="checked" /> Option 3
<input id="chkbx_3" type="checkbox" name="c_n_3" checked="checked" /> Option 4
</div>
<input type="button" id="clickme" value=""click me, now! />
<input type="checkbox" name="chk_group[]" value="value1" />Value 1<br />
<input type="checkbox" name="chk_group[]" value="value2" />Value 2<br />
<input type="checkbox" name="chk_group[]" value="value3" />Value 3<br />