<?xml version="1.0" encoding="iso-8859-1"?>
<!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">
<head>
<title>Untitled</title>
<meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1" />
</head>

<body>

<script type="text/_javascript_">

var numArray = new Array(1,2,3,4,5);
var position;
var randList = "";

while (numArray.length) {
position = getRandomNum(0, numArray.length);
temp = numArray.splice(position,1);
randList += temp;
if (numArray.length) randList += "," // add comma
}

function getRandomNum(lbound, ubound) {
return (Math.floor(Math.random() * (ubound - lbound)) + lbound);
}

document.write("randList: " + randList);

</script>

</body>
</html>

--
Charlie Griefer

================================================
Marta was watching the football game with me when she said,
"You know, most of these sports are based on the idea of one group
protecting its territory from invasion by another group."
"Yeah," I said, trying not to laugh. Girls are funny.
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]

Reply via email to