previous

page 10

next
my load_squares.js

['ALGERIA','LATVIA','BENIN','AUSTRALIA','NICARAGUA','INDIA','ARMENIA']

function load_squares(arr) {
Hide_class('square');
for (var row=0;row<arr.length;row++) {
var country=arr[row];
var letters=country.split('');
for (var col=0;col<letters.length;col++) {
var letter=letters[col];
var id=rc2id(row,col);
Show(id);
var el=document.getElementById(id)
if (col%2==0) {
el.setAttribute('a',letter);
el.textContent='_';
} else {
el.textContent=letter;
}
}
}
}
function rc2id(row,col) {
return 10*row+col;
}

previous
next