ja****************@hotmail.com (-[ CaMeL ]- a55m0nk) writes:
I have attempted to create a javascript that displays on the page a
random number between 100,000 and 600,000, and then displays a new
random number in the same place every second after that. It is for a
fake users online for a gag website i am making in school.
any help would be much appreciated
<p>Users online: <span id="usersFake"></span></p>
<script type="text/javascript">
var numberText = document.createTextNode("");
document.getElementById("usersFake").appendChild(n umberText);
function updateFakeUsers() {
numberText.nodeValue = Math.floor(Math.random()*500000)+100000;
}
updateFakeUsers();
setInterval(updateFakeUsers,1000);
</script>
/L
--
Lasse Reichstein Nielsen -
lr*@hotpop.com
Art D'HTML: <URL:http://www.infimum.dk/HTML/randomArtSplit.html>
'Faith without judgement merely degrades the spirit divine.'