-3

I have a table of which one column contains checkboxes that look like:

<tbody>

    <tr>
         <td><input type="checkbox" name="check[]" value="1"></td> 

the table is initially generated with all check boxes not checked. but when I look at the underlying html with firebug after checking a box , there is no change.

How can I programmatically evaluate whether a box is checked or not?

user1592380
  • 30,233
  • 76
  • 247
  • 468

1 Answers1

1

In Javascript, use the .checked property:

if (element.checked) {
    ...
}

Changing input elements from the UI doesn't change them in the DOM.

Barmar
  • 669,327
  • 51
  • 454
  • 560