HTML Code:
<script type="text/javascript">
var randomize={
aPhrases:[
'he is Raymond Angana aka rangana',
'Antarctica is the only continent without reptiles or snakes.',
'I saw another gibberish',
'I saw this script in DD Forums',
'I saw another message' // Last phrase should not contain a comma
] // Initialize he phrase within the brackets
init:function(){
var genNum=Math.floor(Math.random()*this.aPhrases.length); // Generate random number
document.getElementById('el').firstChild.nodeValue=this.aPhrases[genNum];
}
};
</script>
<style type="text/css">
#el{
#font-weight:bold;
font-family:Arial,tahoma,verdana;
font-size:10pt;
color:#f00;
}
</style>
<p>
Hello my name is Chris Grover and <span id="el">this is the default message</span>.
</p>
<input type="button" value="Randomize" onclick="randomize.init()">
Bookmarks