On load of page, put random image in div
问题 I have the images physically stored on the server, whereas I want to put one of them, randomly, in one particular div, that exists on every page of my website. This is the code I've got so far: function randomFromInterval(from, to) { return Math.floor(Math.random() * (to - from + 1) + from); } $(document).ready(function () { var number = randomFromInterval(1, 3) $("#adv").<--some jQuery functionality here-->(function (e) { switch (number) { case 1: $(".onSideSmall").html('<img src="..