javascript - Random link and once one is shown, I don't want it to show up again -


I'm a novice to do all this, so my question is. I have three different websites what I want to do; When people click on the link, one of them is randomly selected and shows that later on when they click on a button in the website, they will take them randomly for one of the other two, so that He has not been shown beforehand. thank you in advanced.

How would you do this in Java, but you could have a different language If you want to do this on a website then you want PHP or JavaScript.

  public static zero display site () {random random = new random (); Boolean [] passed = {false, false, false}; String [] website = new string []; // Websites irregular to websites while (true) {// will use a pause statement int website = random.nextInt (2); If (near [website] == wrong) {// This website has not yet been shown. System.out.println (website [website]); Passed [website] = true; } // input and possibly break statement see here }}   

Call that method every time you want to display random sites. But every time you call it, you can show all three websites again.

Comments

Popular posts from this blog

Pass DB Connection parameters to a Kettle a.k.a PDI table Input step dynamically from Excel -

multithreading - PhantomJS-Node in a for Loop -

c++ - MATLAB .m file to .mex file using Matlab Compiler -