Random page load

Random page load

Hey guys. I am a noob at coding and basically rely on understanding the basic purpose of a code from demo's and try to take an advantage out of it.

I am trying to create a web-app that will have a few hundred pages. All hard coded but with same template so its not a hassle. I've tried using CMS but it has been disastrous so far.

On my problem, my apps main page is going to have a 'Random' button which will load up a pop-up. In that popup there will be a message displaying, "You are about to be redirected to a random page, please confirm to proceed" and when the user presses 'Okay' the button/popup button will then proceed to loading that random page.

I was suggested by a friend that I should use php and then when i told him that the entire app is based on jquerymobile, he said there is a way to do that with jquery/jquerymobile but he doesn't know.

I was wondering if someone could help my helpless soul out! 

Thank you!

And example would be great if someone could do that! :)