-
-
Save luis-pinheiro/57f1bb94d3e9a42970a5 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<title>JS Bin</title> | |
</head> | |
<body> | |
<button onclick="random()">click</button> | |
<p id="aantal">ll</p> | |
<script> | |
</script> | |
<script id="jsbin-javascript"> | |
var cursos = ["lala", "lele", "lili", "okok", "yyy"]; | |
var max = cursos.length; | |
function random(){ | |
var rnd = Math.floor(Math.random() * max); | |
document.getElementById("aantal").innerHTML = cursos[rnd]; | |
} | |
</script> | |
<script id="jsbin-source-javascript" type="text/javascript"> var cursos = ["lala", "lele", "lili", "okok", "yyy"]; | |
var max = cursos.length; | |
function random(){ | |
var rnd = Math.floor(Math.random() * max); | |
document.getElementById("aantal").innerHTML = cursos[rnd]; | |
}</script></body> | |
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var cursos = ["lala", "lele", "lili", "okok", "yyy"]; | |
var max = cursos.length; | |
function random(){ | |
var rnd = Math.floor(Math.random() * max); | |
document.getElementById("aantal").innerHTML = cursos[rnd]; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment