forked from bethrobson/Head-First-HTML5
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathphraseomatic.html
36 lines (30 loc) · 889 Bytes
/
phraseomatic.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
<!doctype html>
<html lang="en">
<head>
<title>Phrase-o-matic</title>
<meta charset="utf-8">
<style>
body {
font-family: Verdana, Helvetica, sans-serif;
}
</style>
<script>
function makePhrases() {
var words1 = ["24/7", "multi-Tier", "30,000 foot", "B-to-B", "win-win"];
var words2 = ["empowered", "value-added", "oriented", "focused", "aligned"];
var words3 = ["process", "solution", "tipping-point", "strategy", "vision"];
var rand1 = Math.floor(Math.random() * words1.length);
var rand2 = Math.floor(Math.random() * words2.length);
var rand3 = Math.floor(Math.random() * words3.length);
var phrase = words1[rand1] + " " + words2[rand2] + " " + words3[rand3];
var phraseElement = document.getElementById("phrase");
phraseElement.innerHTML = phrase;
}
window.onload = makePhrases;
</script>
</head>
<body>
<h1>Phrase-o-Matic says:</h1>
<p id="phrase"></p>
</body>
</html>