why my js cannot be linked to html? : <p><div class="snippet" data-lang="js" data-hide="false">
<div class="snippet-code">
<pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;!doctype html&gt;
&lt;html&gt;
	&lt;head&gt;
		&lt;script type="text/javascript"&gt;
			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.
		&lt;/script&gt;
	&lt;/head&gt;
	&lt;body&gt;
			&lt;h1&gt;Elderflower&lt;/h1&gt;
			&lt;div id="content"&gt;
				&lt;div class="message"&gt;Available:
					&lt;span id="stock"&gt;&lt;/span&gt;
				&lt;/div&gt;
				&lt;div class="message"&gt;Shipping:
					&lt;span id="shipping"&gt;&lt;/span&gt;	
				&lt;/div&gt;
			&lt;/div&gt;
	&lt;/body&gt;
&lt;/html&gt;</code></pre>
</div>
</div>
</p>

<p>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.</p>
