»
EnglishFrenchVietnamese

Print - Random link button - JavaScriptBank.com

Full version: jsB@nk » Snippet » Random link button
URL: https://www.javascriptbank.com/random-link-button.html

Random link button © JavaScriptBank.comAn easy way to instantly send the visitor to a random HTML page. Just click the random link button and you're done.

Full version: jsB@nk » Snippet » Random link button
URL: https://www.javascriptbank.com/random-link-button.html



JavaScript
<script><!--//specify random links below. You can have as many as you wantvar randomlinks=new Array()randomlinks[0]="#"randomlinks[1]="#"function randomlink(){alert('This is demo only');//window.location=randomlinks[Math.floor(Math.random()*randomlinks.length)]}//--></script><!--    This script downloaded from www.JavaScriptBank.com    Come to view and download over 2000+ free javascript at www.JavaScriptBank.com-->


HTML
<form><p><input type="button" name="B1" value="Random Link >>" onclick="randomlink()"></p> </form><!--    This script downloaded from www.JavaScriptBank.com    Come to view and download over 2000+ free javascript at www.JavaScriptBank.com-->