-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
  • 34,265
  • 92
  • 284
  • 515

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
  • 741,623
  • 53
  • 500
  • 612