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 31 32 33 34 35 36 37 38 39 40
| var espaces = new Array("salon","visiter","pratiquer");
var tab = [ ] ;
tab["salon"] = [
["presentation","presentation.htm","rub_presentation"],
["presentation2","presentation2.htm",""]
];
tab["rub-presentation"] = [
["truc","truc.htm",""],
["truc2","truc2.htm",""],
["truc3","truc3.htm",""],
["truc4","truc4.htm",""],
];
tab["visiter"] = [
["bidule","bidule.htm",""],
["bidule2","bidule2.htm",""],
["bidule3","bidule3.htm",""],
["bidule4","bidule4.htm",""],
];
tab["pratiquer"] = [
["machin","machin.htm",""],
["machin2","machin2.htm",""],
["machin3","machin3.htm",""],
];
function Ecrire()
{
str = '<dl>';
for(i=0;i<espaces.length;i++)
{
str += '<dt>'+espaces[i]+'</dt>';
str += '<dd><ul>';
for(j=0;j<tab[espaces[i]].length;j++)
{
str += '<li>'+tab[espaces[i]][j][1]+'</li>';
}
str += '</ul></dd>';
}
str += '</dl>';
document.write(str);
} |
Partager