JavaScript /无法读取属性toLowerCase的未定义

时间:2019-11-30 06:29:23

标签: javascript

所以我在使用toLowerCase属性时遇到了问题,它一直告诉我无法读取未定义的属性'toLowerCase'

 getenemy.innerHTML = '<img src="characters imgs/enemy/' + 
 enemy.enemyType.toLowerCase() + '.jpg" alt"' + enemy.enemyType + '
 " class="enemy"<div><h3>' + enemy.enemyType + '</h3><p 
 class="health-enemy">Health: ' + enemy.health + '</p>
 <p>Mana: ' + enemy.mana + '</p><p>Strength: ' + 
 enemy.strength + '</p><p>Agility:' + enemy.agility + '</p> 
 <p>Speed: ' + enemy.speed + '</p></div>';

0 个答案:

没有答案