turdlewax
12-13-2001, 06:17 PM
I want to make a loop that will add   a certain amount of times to a 'document write' instruction.
document.writeln("<title>My Site" + Spaces() + "</title>")
I want a script that repeats &NBSP; a set number of times/loops and then writes it to that line, so that I can have a srting of spaces on my <TITLE>.
I'm a newbie to Javascript and this was my crappy go at it:
<head>
<script language=javascript type="text/javascript">
function Spaces(){
var one = i+1;
var numofspc = 50;
document.writeln(" ");Spaces();{
for (i;one){
if (i == numofspc);
}
return
}
}
document.writeln("<title>My Site" + Spaces() + "</title>")
</script>
</head>
document.writeln("<title>My Site" + Spaces() + "</title>")
I want a script that repeats &NBSP; a set number of times/loops and then writes it to that line, so that I can have a srting of spaces on my <TITLE>.
I'm a newbie to Javascript and this was my crappy go at it:
<head>
<script language=javascript type="text/javascript">
function Spaces(){
var one = i+1;
var numofspc = 50;
document.writeln(" ");Spaces();{
for (i;one){
if (i == numofspc);
}
return
}
}
document.writeln("<title>My Site" + Spaces() + "</title>")
</script>
</head>