Coding templates
Template 1
- Get/ Validate/ Do/ Return
- Example
[js]
function test {
var elms = document.getElementsByTagName(‘table’);
for (var i = 0; i < elms.length; i++){
// -Get-
var tableElem = elms[i];// -Validate-
if (tableElem != null) {
var trElem = tableElem.getElementsByTagName("tr")[12];
var tdElem = trElem.getElementsByTagName("td")[3];
var tdText = tdElem.innerText;// -Do- Change font size
tdElem.style.fontSize = ’14px’;
}
}// -Return-
return true;
[/js]
Leave a Reply