I set the variable and I need to insert this variable into the html element, but I can not print it, this is the code:
<script> var randomnumber=Math.floor(Math.random()*11) </script> <div id="<script type="text/javascript">document.write(randomnumber)</script>"></div>
Thanks.
Edit: I just used the div as an example, but I need to add a random number to the img tag, just like for the tracking tag, and it needs a unique identifier. Is there a better way to do this?
source share