Generate random number and place it inside image URL
<p>I want to generate a random number and place it inside an image URL. I found this JS code on the web but it doesn't work:</p>

<pre><code>&lt;script type="text/javascript" language="JavaScript"&gt;
number=Math.random()*10000000000000000;
&lt;/script&gt;

&lt;img src="https://link.com/number="/&gt;
</code></pre>

<p>Can someone see whats wrong with the code? Thanks in advance.</p>