I am trying to display some banner from a remote location using hrefs
and img
in JavaScript.
On client side:
<script src="data/JScript.js?id=123" type="text/javascript"></script>
I want some solution so that I can make 123 dynamic in below JS file. As of now it is hard coded.
I just want that i will give client the above JS link and it will generate a dynamic link to a website with a querystring paramenter like (www.abc.com/123)
JS file (JScript.js):
document.write('<div style="text-align:center" class="img-responsive" ><a href="www.test.com/123" > <img style="width:200px;height:200px;" src="http://pixel.nymag.com/imgs/daily/intelligencer/2015/07/18/20-donald-trump.w529.h352.2x.jpg" alt="" > </img> </a> </div>');