I'm trying to load these three images into the document but I can not, does anyone know why it does not load?
Follow the xhtml file:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title> JavaScript Imagens</title>
<script type = "text/javascript" src = "js/Imagem.js"> </script>
</head>
<body>
<div id ="id">
<img />
<img />
<img />
</div>
</body>
</html>
Follow the Javascript file:
window.onload = function(){
carregarPoltronas();
}
function carregarPoltronas(){
// não está carregando estas tres imagens diferentes.
document.getElementById("id").src= "img/ball_disponivel.jpg";
document.getElementById("id").src= "img/ball_indisponivel.jpg";
document.getElementById("id").src= "img/ball_selecionada.jpg";
}