Skip to content

Instantly share code, notes, and snippets.

@Dafrok
Created June 30, 2016 06:09
Show Gist options
  • Select an option

  • Save Dafrok/49c293a4e5b810552e39f003203a61c2 to your computer and use it in GitHub Desktop.

Select an option

Save Dafrok/49c293a4e5b810552e39f003203a61c2 to your computer and use it in GitHub Desktop.
var table = document.createElement('table')
var thead = document.createElement('thead')
var tbody = document.createElement('tbody')
var firstTr = document.createElement('tr')
var firstTh = document.createElement('th')
table.appendChild(thead)
table.appendChild(tbody)
thead.appendChild(firstTr)
firstTr.appendChild(firstTh)
for (var k = 0; k < 151; k++) {
var id = k + 1
var th = document.createElement('th')
th.innerText = id
firstTr.appendChild(th)
}
document.body.appendChild(table)
table.border = 1
for (var i = 0; i < 151; i ++) {
var tr = document.createElement('tr')
var firstTd = document.createElement('td')
firstTd.innerText = i + 1
for (var j = 0; j < 151; j ++) {
var td = document.createElement('td')
var img = document.createElement('img')
img.src = 'http://images.alexonsager.net/pokemon/fused/'+ (i + 1) + '/' + (i + 1) + '.' + (j + 1) +'.png'
td.appendChild(img)
tr.appendChild(td)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment