Randomizing images

Hi, does anyone knows how to random images as per load? For example: On my index.html I have a header image let’s say is 700 pixels wide and 200 pixels height. I would like to SWAP different images (same size) at different times but, only when the user refreshes the screen and when the user goes to that page for the first time. I have seen it before. I know it’s done via Javascript. Any suggestions?

Thank you