// (gH) -_- taenhaut.js ; TimeStamp (unix) : 12 Février 2010 vers 13:14
// ############################################################################
function script1() {
// ############################################################################
visu = document.getElementById("visu") ;
visu.firstChild.data = "Exécution du script 1...\n\n" ;
for (idc=1;idc<=50;idc++) {
visu.firstChild.data += "affichage de la ligne "+idc+"\n"
} ; // fin de pour idc
// ----------------------------------------------------------------
} ; // fin de fonction script1
// ############################################################################
function script2() {
// ############################################################################
visu = document.getElementById("visu") ;
visu.firstChild.data = "Exécution du script 2...\n\n" ;
for (idc=1;idc<=50;idc++) {
visu.firstChild.data += "affiche de la ligne "+idc+" ;"
} ; // fin de pour idc
// ############################################################################
} ; // fin de fonction script2
// ############################################################################
function script3() {
// ############################################################################
eh3 = document.getElementById("h3s3") ;
eh3.setAttribute("class","visible") ;
eh3.setAttribute("className","visible") ;
visu = document.getElementById("visu") ;
visu.firstChild.data = "Exécution du script 3...\n\n" ;
ds3 = document.getElementById("divs3") ;
for (idc=1;idc<=25;idc++) {
epar = document.createElement("p") ;
etxt = document.createTextNode("paragraphe numéro "+idc) ;
epar.appendChild(etxt) ;
// document.body.appendChild(epar) ; // body.appendChild(epar) n'est pas suffisant
ds3.appendChild(epar) ;
} ; // fin de pour idc
} ; // fin de fonction script3
// ############################################################################
function raz() {
// ############################################################################
visu = document.getElementById("visu") ;
visu.firstChild.data = "(remis à zéro)" ;
eh3 = document.getElementById("h3s3") ;
eh3.setAttribute("class","invisible") ;
eh3.setAttribute("className","invisible") ;
ds3 = document.getElementById("divs3") ;
while(ds3.firstChild) { // delete all nodes
ds3.removeChild(ds3.firstChild);
} // fin de si
} ; // fin de fonction raz
// ############################################################################
|