![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
aroraamit81 (AT) gmail (DOT) com wrote: Hi, How to loop through HTML Table in Javascript, I want to check if any of check box in my HTML Table is checked or not. depends on structure of your table. in general way it should be something like: // first we get all rows var rows = new Array(); rows = document.getElementById("tableId").getElementsByTa gName("TR"); // next we can loop through this array and get all cells for(var i = 0; i < rows.length; i++) { var cells = new Array(); cells = rows[i].getElementsByTagName("TD"); } so you can loop through cells for each row to check if there is <input type="checkbox" /> and if it is checked. |
#3
| |||
| |||
|
#4
| |||
| |||
|
|
Hi, How to loop through HTML Table in Javascript, I want to check if any of check box in my HTML Table is checked or not. Thnx in advance Amit You have a feasible answer. |
![]() |
| Thread Tools | |
| Display Modes | |
| |