Looks to me like you are trying to call a function that doesn't exist.
I assume this is what you are after? https://jsfiddle.net/2Lasqpnx/
function infoBox(id)
{
var node = document.getElementById('mix'+id);
var allNodes = node.getElementsByTagName('td');
var sheltoms = new Array(
"Lucidy",
"Sereneo",
"Fadeo",
"Sparky",
"Raident",
"Transparo",
"Murky",
"Devine",
"Celesto",
"Mirage",
"Inferna",
"Enigma",
"Bellum",
"Oredo",
"Sapphire",
"Sol");
var text = "";
for (var i=0; i<16; i++)
{
var s = 2 + i;
if(allNodes[s] != null && allNodes[s].innerHTML && allNodes[s].innerHTML.length > 0)
{
text = text + allNodes[s].innerHTML
+ ' x <img src="images/sheltoms/'
+ sheltoms[i].toLowerCase() + '.gif" class="box_sheltom_img" alt="' + sheltoms[i] + '"><br>
';
}
}
var infoBoxArea = document.getElementById('info_box');
var name = allNodes[0].innerHTML;
var effect = allNodes[1].innerHTML;
infoBoxArea.innerHTML = '<div class="box_header"><span class="box_close" onclick="document.getElementById('info_box').style.display='none';">Close</span>Mix Info</div>
<div class="box_content">'
+ '<b>Name:</b><br>'
+ name + '<br><br><b>Effect:</b><br>'
+ effect + '<br><br><b>Sheltoms:</b><br>'
+ text + '</div>';
infoBoxArea.style.display = 'block';
}
document.getElementById("weapons").style.display = 'block';
document.getElementById("defense").style.display = 'none';
function showCategory(s)
{
if( s.innerHTML == 'Weapons' )
{
document.getElementById("weapons").style.display = 'block';
document.getElementById("defense").style.display = 'none';
}
else if( s.innerHTML == 'Defense' )
{
document.getElementById("weapons").style.display = 'none';
document.getElementById("defense").style.display = 'block';
}
}
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…