Currently, I am teaching myself HTML, CSS, and JavaScript and experimenting with building something interesting.
I have a vision of creating 100 clickable images/links (essentially buttons featuring the same image). I want a certain percentage of these buttons to direct users to one page, while the rest lead to another page. The user would not know this until they click on a button.
Every time the page is reloaded, I desire the placement of the images/links to be randomized.
Although I am aware that I can generate random numbers in JavaScript using Math.random()
, I am struggling to implement the concept described above. As I believe in learning by doing, I wondered if anyone could provide me with some guidance.