Last active
September 27, 2018 02:30
-
-
Save zhanggang807/648a5c1d0ffcb257b0b731252cac324b to your computer and use it in GitHub Desktop.
get all of td from a table tag
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var rows = document.getElementById('grid-table').rows | |
for (var i = 0; i < rows.length; i++) { | |
var row = rows[i]; | |
var tds = row.children; | |
for (var j = 0; j < tds.length; j++) { | |
var td = tds[j]; | |
//console.log(td.getAttribute("title")) | |
if (td.getAttribute("title") == '0'){ | |
td.click(); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment