Created
June 14, 2015 15:04
-
-
Save ioslh/5abaad2e50eb2614825c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
window.onload=function(){ | |
var table=document.createElement("table"); | |
for(var i=1;i<10;i++){ | |
var tr=document.createElement("tr"); | |
if(i%2==0){ | |
tr.className="dark"; | |
}else{ | |
} | |
for(var j=1;j<i+1;j++){ | |
var td=document.createElement("td"); | |
td.innerHTML=j+"*"+i+"="+i*j; | |
tr.appendChild(td); | |
} | |
table.appendChild(tr); | |
} | |
document.body.appendChild(table); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment