일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | ||
6 | 7 | 8 | 9 | 10 | 11 | 12 |
13 | 14 | 15 | 16 | 17 | 18 | 19 |
20 | 21 | 22 | 23 | 24 | 25 | 26 |
27 | 28 | 29 | 30 |
Tags
- rowspan
- jQuery
- Spring
- sencha touch
- 선택적조인
- swingx
- oracle
- Google Map
- Android
- phonegap
- JDOM
- WebLogic
- 가우스
- dock
- PLSQL
- ibsheet
- appspresso
- node.js
- JSON
- MySQL
- jsr 296
- Ajax
- PHP
- Eclipse
- tomcat
- iBATIS
- Struts
- GPS
- MFC
- 전자정부프레임워크
Archives
- Today
- Total
Where The Streets Have No Name
element find function 본문
function findParentTag(elem, sTag) {
while(elem && elem.tagName.toUpperCase() !='BODY'){
elem = elem.parentNode;
if(elem.tagName.toUpperCase() == sTag.toUpperCase())return elem;
}
}
function findTagByName(elem, tagName, name) {
var tags = elem.getElementsByTagName(tagName.toUpperCase());
for (var idx=0; idx<tags.length; idx++) {
if (tags[idx].name == name) return tags[idx];
}
return null;
}
function findParentRow(elem){
while(elem && elem.tagName.toUpperCase() !='BODY'){
elem = elem.parentNode;
if(elem.tagName.toUpperCase() == 'TR' && elem.id.toLowerCase() == 'row')
return elem;
}
}
function findInRow(elem, tagName, name){
var row = findParentRow(elem);
return findTagByName(row, tagName, name);
}