This file contains hidden or 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 startNode = document.body; | |
// multipleNode = false | |
function getElementByType(nodeList, type, value){ | |
for(var outerIdx = 0,outerIdxLen = nodeList.childNodes.length; outerIdx < outerIdxLen; outerIdx++ ){ | |
if(nodeList.childNodes[outerIdx].childNodes.length){ | |
getElementByType(nodeList.childNodes[outerIdx], type, value); | |
} | |
if(type == "tagname"){ | |
if(nodeList.childNodes[outerIdx].tagName && nodeList.childNodes[outerIdx].tagName.toLowerCase() == value.toLowerCase()){ | |
console.log(nodeList.childNodes[outerIdx]); |
This file contains hidden or 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 line = "BALL AREA LEAD LADY"; | |
var wordAry = line.split(" "); | |
console.log(wordAry); | |
var rowIdx = 0; | |
var colIdx = wordAry.length; | |
var len = colIdx; | |
var isWordSquare = true; | |
while(colIdx > 0 && rowIdx < len){ |