<!Doctype html>
<html>
<body>
<div class="pon" onclick="poniedzialek()">PON</div>
<div class="wt" onclick="wtorek()">WT</div>
<div class="sr" onclick="sroda()">SR</div>
<div class="czw" onclick="czwartek()">CZW</div>
<div class="pt" onclick="piatek()">PT</div>
<div class="wyswietla"></div>
</body>
</html>
.pon,.wt,.sr,.czw,.pt{
width:5%;
height: 10vh;
border:1px solid black;
line-height: 10vh;
text-align: center;
margin-bottom:4vh;
}
.wyswietla{
width:5%;
height:10vh;
border:solid 2px black;
}
function poniedzialek(){
var pon =['Stefan<br>','Bogusława<br>','Wiesława<br>','Janina<br>'];
document.write( pon[0] );
document.write( pon[1] );
document.write( pon[2] );
document.write( pon[3] );
};
function wtorek(){
var pon =['Stefan<br>','Bogusława<br>','Jerzy<br>','Andrzej<br>'];
document.write( pon[0] );
document.write( pon[1] );
document.write( pon[2] );
document.write( pon[3] );
};
function sroda(){
var pon =['Stefan<br>','Bogusława<br>','Wiesława<br>','Janina<br>'];
document.write( pon[0] );
document.write( pon[1] );
document.write( pon[2] );
document.write( pon[3] );
}
function czwartek(){
var pon =['Stefan<br>','Bogusława<br>','Jerzy<br>','Andrzej<br>'];
document.write( pon[0] );
document.write( pon[1] );
document.write( pon[2] );
document.write( pon[3] );
}
function piatek(){
var pon =['Janina<br>','Karbownik<br>','Dudek<br>','Andrzej<br>'];
document.write( pon[0] );
document.write( pon[1] );
document.write( pon[2] );
document.write( pon[3] );
}
Jak zrobić by na tej samej stronie wyświetlało mi elementy tablicy w pustym divie "wyswietl".