Random Number generator

I need help with what I think is actually very simple. I want a piece of code to generate a random number which then becomes the input to select a dynamic page in wix.

Ultimately I want to show my clients a QR code which will take them to the Wix page which has the random number generator code in it and then they are immediately takes them to the page associated with the number. I’d want to be able to change the code to change input the minimum and maximum number if i add or take away more items in the database

Ive created a database in Wix with all the information that would populate the dynamic page and have an Integer as the index so that part works fine.

Im struggling with Corvid code (Im not a coder). I have managed to cobble together some simple code and publish it from GitHub, but I’d love to get it inside my own Wix website.

Below is what I have done at GitHub and this works and does exactly what I want (maybe it’s not the most elegant piece of coding ever!) - so essentially I am asking - how can i do the same inside a Wix page?

All ideas gratefully received

To use the html code that you have posted above, you will need to put it in a html iFrame on your page.
https://support.wix.com/en/article/using-iframes-to-display-visible-content-on-your-site

If you want to do it in javascript which Wix uses, then you can simply look at previous forum posts about this as there are many.

Just use the search function for random number or something similar.

You can find a few in the related posts box on this very forum post that can help you immediately.
https://www.wix.com/corvid/forum/community-discussion/random-number-generator
https://www.wix.com/corvid/forum/community-discussion/how-to-add-a-random-number-to-a-database

If you go to the first link above, there is a n example on this website.
https://webiya.wixsite.com/rnd-number-example