topical media & game development
basic-web-html-12-ch12-eg18.htm / htm
<?xml version="1.0" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
<title>Random Content</title>
<script type="text/JavaScript">
function randomContent(){
var arrContent=new Array()
arrContent[0]='This is the first message.'
arrContent[1]='This is the second message.'
arrContent[2]='This is the third message.'
arrContent[3]='This is the fourth message.'
arrContent[4]='This is the fifth message.'
var i=Math.floor(Math.random()*arrContent.length)
document.write(arrContent[i])
}
</script>
</head>
<body>
<script type="text/JavaScript">
randomContent();
</script>
</body>
</html>
(C) Æliens
20/2/2008
You may not copy or print any of this material without explicit permission of the author or the publisher.
In case of other copyright issues, contact the author.