Like this?
<!DOCTYPE html>
<html>
<head>
<script>
var links = ['http://google.com', 'http://facebook.com']
function GoToSomeAddress() {
window.open(links[getRandomInt(0, 1)]);
}
function getRandomInt(min, max) {
return Math.floor(Math.random() * (max - min + 1)) + min;
}
</script>
</head>
<body>
The content of the body element is displayed in your browser.
<a href="" onclick="GoToSomeAddress();return false;">Take me on an adventure</a>
</body>
</html>
3
solved How to make one hyperlink give different pages? [closed]