<!doctype html>
<html>
<head>
<script type="text/javascript">
var instock=true;
var shipping=false;
var elstock= document.getElmentById('stock');
elstock.className=instock;
var elship= document.getElmentById('note');
elship.className=shipping;
//the text should be updated by values stored
//in these variables.
</script>
</head>
<body>
<h1>Elderflower</h1>
<div id="content">
<div class="message">Available:
<span id="stock"></span>
</div>
<div class="message">Shipping:
<span id="shipping"></span>
</div>
</div>
</body>
</html>
why js cannot be linked to html??? and how i can link css images to js as well? For example, if it is true, show circle image. If it is false, show cross image.