So I've got code that looks like this:(所以我有代码看起来像这样:)
<input class="messageCheckbox" type="checkbox" value="3" name="mailId[]">
<input class="messageCheckbox" type="checkbox" value="1" name="mailId[]">
I just need Javascript to get the value of whatever checkbox is currently checked.(我只需要Javascript来获取当前检查的任何复选框的值。)
EDIT : To add, there will only be ONE checked box.(编辑 :要添加,只有一个复选框。)
ask by Mandatory Programmer translate from so
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…