2
I’m having trouble asking a question:
A small library has only fiction and textbooks (Mathematics, Portuguese, etc.). You are building the system of loans from that library. On the first page of the system, you should there is a select for the user to choose between the genre of fiction or didactics. If the genre of fiction is chosen, the system should show, just below, the image of the book cover, the author and the summary of a book from the Harry Potter saga and a book by Sidney Sheldon.
<!DOCTYPE html>
<html>
<head>
<h1>Biblioteca </h1>
<script>
var harry = document.getElementById('imagem-harry');
function mostrarFoto(ficcao) {
var fic = document.getElementById(ficcao);
var foto = "img.src='livroharry.jpg'"
if (genero.value == 'ficcao') {
document.getElementById('ficcao').value) {
alert(imagem);
harry.innerHTML = "Harry Potter (Daniel Radcliffe) retorna à Escola de Magia e Bruxaria de Hogwarts, para cursar o 5º ano letivo. ... Além disto, o Ministro da Magia Cornélio Fudge (Robert Hardy) impõe à escola a presença de Dolores Umbridge (Imelda Staunton), que torna-se a nova professora de Defesa Contra as Artes das Trevas.";
}
}
}
</script>
</head>
<body>
<select id="genero" onchange="(mostrarFoto)">
<option value="ficcao" id="ficcao"> Ficcao </option>
<option value="didatico" "id="didatico "> Didatico </option>
</select>
<div id="imagem ">
<img src="livroharry.jpg " />
</div>
</body>
</html>
Thank you very much <3 Now I understand what I should do. I can’t tell you how grateful I am that you helped me and that I was able to understand you correctly :D
– Mikeli Guedes
@Mikeliguedes I’m glad it worked out! If you can, mark the answer as accepted by clicking on the left side of the text - then it leaves the "unanswered questions" queue (and I get dots that are worth more than gold!) O________O - Ah, and welcome to Stack Overflow! :)
– Daniel