Quote:
Originally Posted by AricC
[html]<html>
<head>
<title>Test</title>
<script type="text/javascript">
function DisplayRandomGreekWord()
{
var GreekWord = new Array()
GreekWord[0] = "Some word"
GreekWord[1] = "Some other word"
GreekWord[2] = "Some other different word"
var RandomNumber = Math.floor(Math.random()*3)
if (RandomNumber == 0)
{
document.write('<b>' + GreekWord[RandomNumber] + '</b>')
}
if (RandomNumber == 1)
{
document.write('<b>' + GreekWord[RandomNumber] + '</b>')
}
if (RandomNumber == 2)
{
document.write('<b>' + GreekWord[RandomNumber] + '</b>')
}
document.write('<br /><br />')
document.write('<a href="javascript:history.go(-1)">Go back</a>')
}
</script>
</head>
<body>
<form>
<input type="button" size="25" value="Click Me!" onclick="DisplayRandomGreekWord();" />
</form>
</body>[/html]
HTH,
Aric
Aric,
Thanks for the code. My question is how do you set up the array so that the browser will show "Some word" in Greek letters with the accents? I know english words will show in the browser but is there some kind of format to change to another language? Thanks again Aric for taking the time to answer my question.
pros