Skip to content

Instantly share code, notes, and snippets.

@korenmiklos
Last active August 30, 2017 19:45
Show Gist options
  • Save korenmiklos/48f6f03265761ec128bddf495c1b9073 to your computer and use it in GitHub Desktop.
Save korenmiklos/48f6f03265761ec128bddf495c1b9073 to your computer and use it in GitHub Desktop.
Display the source blob
Display the rendered blob
Raw
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
<title>Econ Title Generator</title>
</head>
<body>
<script type="text/javascript" src="random_titles.js"></script>
<script type="text/javascript">
var generateLoremIpsum = function(len) {
var word = Math.floor(Math.random() * titles.length);
return titles[word];
};
window.onload=function(){
var generate = document.getElementById('generate');
var result = document.getElementById('result');
generate.addEventListener('click', function() {
var text = generateLoremIpsum(1);
result.innerHTML = text;
}, false);
}
</script>
<center>
<button id="generate">Generate Econ Title</button>
<h1 id="result"></h1>
</center>
</body>
</html>
This file has been truncated, but you can view the full file.
View raw

(Sorry about that, but we can’t show files that are this big right now.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment