Is there a script that could count from 1 to 100 in an HTML or JAVA script format?

Fighterlegend

New member
I made the script, but it wont work. Any help?
<SCRIPT language="JavaScript">
var num=0;
num=num+1
if (num>{NUMBER})
{
number=0
}
</SCRIPT>

This is actually for PHPBB, and {NUMBER} is the user's inputted number.
Thanks to BlackCompe, I got a better script. But it wont work inside a PHPBB place. I know I should've asked earlier..
<script type="text/javascript">
function load()
{
for(i = 0; i < {NUMBER}; i++)
document.write(i+1+" ");
}
</script>
 
<html>
<head>
<script type="text/javascript">
function load()
{
for(i = 0; i < 100; i++)
document.write(i+1+" ");
}
</script>
</head>

<body onload="load()">
</body>

</html>
 
HTML can't do that. Javascript can.

Define the variables.
Define what action starts the loop.
Start the loop.
Variable + 1.
End the loop when it gets to 100.
 
Back
Top