Alex Yeh
02-15-2007, 07:32 PM
Hello.
I'm new to Javascript. As an exercise, I thought I'd try to write a script that writes a phrase onto a web page repeatedly. Unfortunately, my code isn't working. Here's what I wrote:
<!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>
<meta http-equiv="Window-target" content="_top">
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<meta http-equiv="Content-Language" content="en-us">
<meta name="Robots" content="noindex, nofollow, noarchive, noimageclick">
<meta name="MSSmartTagsPreventParsing" content="TRUE">
<title>::TESTING 1,2,3::</title>
<script type="text/javascript">
<!--
function Lurve(){
var bloogie = new Array();
var noogie = document.createTextNode('Repetition is a good thing!');
for(var i=0,i<200,i++){
bloogie[i] = noogie;
document.getElementsByTagName('p')[0].appendChild(bloogie[i]);
}
}
window.onload=Lurve;
-->
</script>
</head>
<body>
<table width="707" border="0" align="center" bgcolor="#FFFFFF">
<tr>
<td><p> </p></td>
</tr>
</table>
</body>
</html>
</script>
</head>
<body>
<table width="707" border="0" align="center" bgcolor="#FFFFFF">
<tr>
<td><p> </p></td>
</tr>
</table>
</body>
</html>
I'm new to Javascript. As an exercise, I thought I'd try to write a script that writes a phrase onto a web page repeatedly. Unfortunately, my code isn't working. Here's what I wrote:
<!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>
<meta http-equiv="Window-target" content="_top">
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<meta http-equiv="Content-Language" content="en-us">
<meta name="Robots" content="noindex, nofollow, noarchive, noimageclick">
<meta name="MSSmartTagsPreventParsing" content="TRUE">
<title>::TESTING 1,2,3::</title>
<script type="text/javascript">
<!--
function Lurve(){
var bloogie = new Array();
var noogie = document.createTextNode('Repetition is a good thing!');
for(var i=0,i<200,i++){
bloogie[i] = noogie;
document.getElementsByTagName('p')[0].appendChild(bloogie[i]);
}
}
window.onload=Lurve;
-->
</script>
</head>
<body>
<table width="707" border="0" align="center" bgcolor="#FFFFFF">
<tr>
<td><p> </p></td>
</tr>
</table>
</body>
</html>
</script>
</head>
<body>
<table width="707" border="0" align="center" bgcolor="#FFFFFF">
<tr>
<td><p> </p></td>
</tr>
</table>
</body>
</html>