Witam. Rozpoczynam przygodę z JS. W ramach treningu zmieniam klasy dla elementu obraz oraz tabela. Niestety kod nie działa. Proszę o pomoc.
<html>
<head>
<link rel="Stylesheet" type="text/css" href="Style.css" />
<link rel="Stylesheet" type="text/css" href="css/fontello.css" />
<link href="https://fonts.googleapis.com/css?family=Lato" rel="stylesheet">
<meta http_equiv="content_type" content="text/html;charset=ISO-8859-2">
<link href="https://fonts.googleapis.com/css?family=Source+Sans+Pro:400,700" rel="stylesheet">
<meta charset="utf-8" />
<script type="text/javascript">
document.getElementById('obraz').className= 'obraz1';
document.getElementById('tabela').className= 'tabela1';
</script>
</head>
<body>
<img src="pies.jpg" id="obraz">
<table id="tabela">
<tr>
<td>nic</td>
<td>nic</td>
<td>cos</td>
</tr>
</table>
</body>
</html>