Display Random Message on Page Refresh

Show Rendom Message On Page refresh.
Place all the Messages in an Array
Math.floor(Math.random() * 8) function will pick the random record from array.

Sample Code:

<script language="JavaScript" type="text/javascript">
var arMessage = new Array(
'She is a complete waste of space',
'I did not recognize you with your clothes on ',
'If I never see you again, it will be too soon ',
'He is so full of shit, even his eyes are brown',
'You are so far up our managers ass, I can almost see your legs',
'She is as welcome as a turd in a swimmingpool',
'My boss is an accident waiting for a place to happen',
'I would not piss on you, even when you were on fire');
var ind = Math.floor(Math.random() * 8);
document.write('<b class="r">'+arMessage[ind]+'</b>');
</script>

0 comments: