I just wanted to know how can I create a button that can take a person to multiple websites in a random order when it is clicked each time. I do not want these websites to open
Make a JS array with the target URLs, and randomly pick from it when the button is clicked.
Here is a working example:
<script type="text/javascript">
var urls = [
"http://www.kittenwar.com/",
'http://heeeeeeeey.com/',
'http://eelslap.com/',
'http://www.staggeringbeauty.com/',
'http://www.omfgdogs.com/',
'http://burymewithmymoney.com/',
'http://www.fallingfalling.com/',
'http://ducksarethebest.com/',
'http://www.republiquedesmangues.fr/',
'http://www.trypap.com/',
'http://www.hristu.net/',
'http://www.partridgegetslucky.com/',
'http://www.rrrgggbbb.com/',
'http://www.sanger.dk/',
'http://www.geodu.de/',
'http://beesbeesbees.com/',
'http://breakglasstosoundalarm.com/',
'http://www.koalastothemax.com/',
'http://grandpanoclothes.com/',
'http://www.everydayim.com/',
'http://www.haneke.net/',
'http://instantostrich.com/',
'http://r33b.net/',
'http://cat-bounce.com/'
];
function goSomewhere() {
var url = urls[Math.floor(Math.random()*urls.length)];
window.location = url; // redirect
}
</script>
And here is a link with this onClick handler assigned.
<a href="#" onClick="goSomewhere(); return false;">Gimme something weird!</a>
You can style it to look like a button, if you want.
Just FYI the crazy links come from TheUselessWeb's list.