function sample1Func(){ for(var s1Index=0; s1Index<5; s1Index++){ console.log(s1Index); } }
function sample2Func(){ var s2Array = ["カシ","シマトネリコ","アベリア","モッコク"]; for(var s2Index=0; s2Index
var s3Div = document.getElementById("s3Div"); function s3Func(){ var s3p = document.createElement("p"); s3p.innerText = "s3p"; s3Div.appendChild(s3p); } function s3Func02(){ var s3Ps = s3Div.getElementsByTagName("p"); for(var i=0; i
s4Btn.onclick = function s4Func(){ var s4Div = document.getElementById("s4Div"); var s4Input = document.getElementById("s4Input").value; var s4Num = document.getElementById("s4Num").value; for(var i=0; i
function s5Func(){ var s5Array = document.querySelectorAll("#s5Ul li"); for(var i=0; i
function s6Func(){ var sample6 = document.getElementById("sample6"); var table = document.createElement("table"); sample6.appendChild(table); for(var i=1; i<10; i++){ var tr = document.createElement("tr"); table.appendChild(tr); for(var j=1; j<10; j++){ var td = document.createElement("td"); tr.appendChild(td); td.textContent += i * j; } } }