Edit This Code:
<!DOCTYPE html>
<html>
<body>

<p id="demo"></p>

<script>
if (Math.random() < 0.5) {
    text = "<a href='http://w3schools.com'>Visit W3Schools</a>";
} else {
    text = "<a href='http://wwf.org'>Visit WWF</a>";
}
document.getElementById("demo").innerHTML = text;
</script>

</body>
</html>


Result:
Try it Yourself - © w3schools.com
Privacy Policy