Conte-nos o que está acontecendo:
When the #search-input element contains a valid creature ID and the #search-button element is clicked, the UI should be filled with the correct data.
21. When the search button is clicked, the app should send a fetch request to the correct endpoint for the creature name or ID. esta dando estes erros e ja esta tudo conforme pedido
Seu código até o momento
<!-- file: index.html -->
<!DOCTYPE html>
<html lang="pt-BR">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Busca de Criaturas de RPG</title>
<link rel="stylesheet" href="styles.css">
</head>
<body>
<main>
<h1>Busca de Criaturas de RPG</h1>
<div class="app-container">
<form id="search-form" role="search">
<label for="search-input">Buscar por Nome ou ID da Criatura:</label>
<input type="text" id="search-input" name="search" placeholder="Digite o nome ou ID" required>
<button id="search-button" type="submit">Buscar</button>
</form>
<div id="result-display">
<div class="top-section">
<span id="creature-name"></span>
<span id="creature-id"></span>
</div>
<div class="middle-section">
<span id="weight"></span>
<span id="height"></span>
</div>
<div class="sprite-box">
<img id="sprite" src="" alt="imagem da criatura">
</div>
<div id="types"></div>
<table class="stats-table">
<tbody>
<tr>
<td>HP</td>
<td id="hp"></td>
</tr>
<tr>
<td>Ataque</td>
<td id="attack"></td>
</tr>
<tr>
<td>Defesa</td>
<td id="defense"></td>
</tr>
<tr>
<td>Ataque Especial</td>
<td id="special-attack"></td>
</tr>
<tr>
<td>Defesa Especial</td>
<td id="special-defense"></td>
</tr>
<tr>
<td>Velocidade</td>
<td id="speed"></td>
</tr>
</tbody>
</table>
</div>
</div>
</main>
<script src="script.js"></script>
</body>
</html>
/* file: script.js */
/* file: styles.css */
Informações do seu navegador:
Agente de usuário: Mozilla/5.0 (X11; CrOS x86_64 14541.0.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/138.0.0.0 Safari/537.36
Informações do desafio:
Build an RPG Creature Search App Project - Build an RPG Creature Search App