Javascript check all checkboxes in a table / asp.net
Posted
by SLC
on Stack Overflow
See other posts from Stack Overflow
or by SLC
Published on 2009-10-09T10:31:47Z
Indexed on
2010/05/18
11:30 UTC
Read the original article
Hit count: 170
JavaScript
|ASP.NET
I have a table with rows in, and each row has a few <td>
elements. The last element has a checkbox in.
They are in a <div>
which is set to runat="server"
. I have another checkbox on the page called "chkAll" that when clicked, I want to javascript check or uncheck all of the checkboxes in my table.
I'm not very good at Javascript, so I am not sure what to do. I added a javascript onclick method, and put document.getelementbyid and put in the div.clientID, but I wasnt sure what to do from there. Any ideas?
© Stack Overflow or respective owner